OKEY DOKEY...
Here are some heavily linux-specific instructions for folks who might want to migrate a DB table from MySQL to PostGreSQL. It might be possible to avoid having to login as postgres, but that's how i've done it. Also, I'm wondering if it might be possible to suppress the terminal output when records are inserted to speed things up...maybe just get progress report instead?
STEP 1: Dump the MySQL DB without backquotes
mysqldump --skip-quote-names -u user_name -p database_name table_name > sql_dump_file_name.sql
STEP 2: Alter the table definition part of the dump to be PostGre compatible
NOTE: there might be other steps needed here
change TINYINT(x) to SMALLINT
remove UNSIGNED wherever you see it
drop any lines saying PRIMARY KEY (field_name)
instead, put the key declaration where the field is defined like so:
fieldname varchar(5) NOT NULL default '' PRIMARY KEY
remove TYPE=MyISAM from the end of the table create statement
STEP 3: use PSQL to run the script you've got
login to unix command line
execute the now-modified script you just dumped:
psql -f /full/path/to/sql_dump_file_name.sql database_name
STEP 4: Reassign permissions to the newly resulting table to whoever they need to go to.
from linux command line, use the postgres command line client to login to the database (you may need to first login as root and then do 'su - postgres' depending on permissions):
psql database_name
* give ownership to some other user:
ALTER TABLE table_name OWNER TO new_owner;
OR
* just give permissions to the other user:
GRANT SELECT, INSERT, UPDATE, DELETE ON table_name TO other_user;
Tada! now it should work for you? Anybody see any mistakes? this seems to work for me.