Hi,
From MySQL 4.1, there is a support for mysqldump --compatible option.
There is a safe/cool dump for your table:
Try lik:
shell > mysqldump -u dev -p visolvetestdb credits --compatible=postgresql >
/home/test/ps.sql
And also,
By default tables are dumped in a format optimized for MySQL.
Legal modes are: ansi, mysql323, mysql40, postgresql, oracle, mssql, db2,
maxdb, no_key_options, no_table_options, no_field_options. One can use
several modes separated by commas.
Thanks
ViSolve DB Team
----- Original Message -----
From: "Jim C." <[EMAIL PROTECTED]>
To: <mysql@lists.mysql.com>
Sent: Friday, February 02, 2007 10:31 PM
Subject: MySQL to Postgres
I'm having to move some data from MySQL to Postgres. I used mysqldump
--compatible=postgresql, but the compatibility is extremely lacking. I'm
actually rather shocked that there doesn't seem to be a common open
standard (XML?) in use for this sort of thing.
Anyway, I'm having to line by line, table by table it.
I came across this statement and was wondering if anyone knew how I can
convert it to Postgres:
CREATE TABLE "credits" (
"person" integer NOT NULL default '0',
"chanid" int NOT NULL default '0',
"starttime" timestamp NOT NULL default '1970-01-01 00:00:00+00',
"role"
set('actor','director','producer','executive_producer','writer','guest_star','host','adapter','presenter','commentator','guest')
NOT NULL default ''
-- CONSTRAINT "chanid_constraint0" UNIQUE
("chanid","starttime","person","role")
-- UNIQUE KEY "chanid" ("chanid","starttime","person","role"),
-- KEY "person" ("person","role")
);
Note that it accepts everything until it hits the 'role' line. Errors
found below:
CREATE TABLE
ERROR: table "credits" does not exist
ERROR: syntax error at or near "(" at character 183
Jim C.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]