migrating from mysql

From: Junaili Lie <junaili(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: migrating from mysql
Date: 2004-12-23 01:03:56
Message-ID: 8d04ce990412221703326f8bc6@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi everyone,
I am new to postgresql.
I am planning to migrate our current database (mysql) to posgresql. I
am currently having difficulties dealing with the order of the tables
that is created.
Here is what I do:
1. I use myqsldump to get the schema and data.
2. I use my2pg and a java utility I created to convert mysqldump to
sql statement that is understood by postgresql.
3. When populating the data to postgresql, it complained relation
"xxx" doesn't exist. This is the case because the table that is
refrenced has not been created.
The quick fix to this will be to change the sequence of the tables
that are created in such a way that tables that are being referenced
are first created before referencing table.
However, this is not practical if we have many tables.
My questions is: is there a way to get around this? is it possible to
disable checking for relation when creating a table that is
referencing to other tables?
I've searched around the internet and found somebody mentioning about
disable-fk-verifications, but I got an error (something like invalid
configuration parameters).
I am currently using postgresql 7.4.6.

Any ideas/suggestions is greatly appreciated.

J

Browse pgsql-general by date

  From Date Subject
Next Message Dann Corbit 2004-12-23 01:18:49 Re: migrating from mysql
Previous Message Geoffrey 2004-12-23 00:55:05 Re: What HW / OS is recommeded