> Is there a simple way of copying a postgres database to MySQL? I was > hoping that postgres's backup 'pg_dump' utility (which dumps a > database into a text file in such a format that it can be easily > recreated) might be compatible with MySQL's backup and restore > facilities.
Zenzo wrote:
i think you can because the dump file is a sql file and it is universal for both exception that mysql hasn't subselects. If you havent subselects it should work
Thanks Zenzo and sorry to take a couple of days to get back to you (I've been ill).
Unfortunately you can't use a postgres pg_dump created file to import a database into MySQL. There are too many incompatibilities, such as the 'boolean' type, varchar being limited to 255 chars (in MySQL), SERIAL (for the primary key) and probably a few more. Also pg_dump is designed to create output that when used will exactly create a postgres database of the database that was 'dumped' in the first place, so quite a lot of the pg_dumped formatting is postgres specific.
It didn't take too long to alter and create the tables for MySQL and then to write the postgres database's data in such a way as to import them into MySQL using 'LOAD DATA LOCAL INFILE...'.
Thanks and regards,
..matthew
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]