How to convert a MySQL database to PostgreSQL?
have you tried:

mysqldump --compatible=postgresql dbname &gt; export.sql


then do this to escape quotes

sed "s/\\\'/\'\'/g" export.sql &gt; export1.sql


may need some more massaging so look at mysqldump doco more closely.