#!/usr/bin/perl

# Version 0.0.1a
# mysql2psql -- convert MySql DumpFILEi(s) to a PostgreSQL DumpFILE

while (<>) {

   if (/^#/) {
     next;  
   }

   if (/auto_increment/) {
     s/auto_increment//;
   }

   if (/int\(/) {
     s/int\(.*\)/integer/;
   }

   if (/longblob/) {
     s/longblob/bytea/;
   }

   if (/tinytext/) {
     s/tinytext/varchar(255)/;
   }

   print $_;

}



