[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-sql
Subject:    Re: [SQL] MySQL DB to PostgresSQL DB
From:       Joe <dev () freedomcircle ! net>
Date:       2006-05-18 14:23:12
Message-ID: 446C8350.5010606 () freedomcircle ! net
[Download RAW message or body]

Jose Apablaza wrote:
> - Is posible to export MySQL DB to PostgreSQL DB?
> - Does PostgreSQL DB has tools to import MySQL DB?
> - If is posible, How do I need to build the DB in MySQL?, in order to 
> have success in the exportation.
> - Do someone did it before?, exporting MySQL DB to PostgreSQL DB?
> - What kind of risk do we can to have in this process?
> - How long can take this process?

Yes, it's doable, but it's not as straighforward as

    mysqldump -someflags mydbname | psql -someotherflags pgdbname

I suggest you start by checking the resources/articles in the MySQL 
section of http://www.postgresql.org/docs/techdocs.3 (which I'm glad to 
say is much better organized and comprehensive than when I had to do 
it).  FWIW, I converted using CSV as the intermediate format, and the 
dates and timestamps were the trickiest, which required the use of 
"staging" tables (with a textual representation of the columns).  An 
interesting side effect was discovering data inconsistencies in the 
MySQL database since as part of the conversion I implemented foreign key 
constraints under PostgreSQL (which were missing in the former).

Joe

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@postgresql.org so that your
       message can get through to the mailing list cleanly
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic