top | item 9123544

MySQL to PostgreSQL converter

78 points| mihailshumilov | 11 years ago |github.com

36 comments

order
[+] jeltz|11 years ago|reply
I would recommend using pgloader (http://pgloader.io/) instead. It is simple to use in the default case, but can be configured with rules for how data types should be converted if necessary. It can also clean up weird timestamps like 0000-00-00 00:00:00.
[+] adamferguson|11 years ago|reply
Upvote for pgloader. Moving data from SQL Server into Postgres with PGLoader has been fairly seamless and the maintainer is very responsive on Github.
[+] scrollaway|11 years ago|reply
Seconded. Used pgloader to turn a massive mysql database into postgres. Turned out great.
[+] bjacobel|11 years ago|reply
No foreign key support is kind of a deal-breaker. Hard to believe anyone who is actually in the position of needing this would have a schema so simple that it contains no foreign keys.
[+] warbiscuit|11 years ago|reply
Hard to believe mysql doesn't include that data in one of it's dump formats.
[+] stephen|11 years ago|reply
We were getting really close to converting our RDS instance from MySQL -> PG, but now with Amazon Aurora being the spiffy super-scalable/etc. RDS engine, we'll probably end up moving to that when/if needed.

Which is a mixed blessing; Aurora sounds great, but I was looking forward to getting back into PG after years of RDS being MySQL-only.

[+] codexon|11 years ago|reply
I find the more difficult issue to be rewriting bulk "insert ignore" and "on duplicate key" queries.
[+] tiglionabbit|11 years ago|reply
Yeah, seems like postgres is the only database that doesn't support those things. I mean, I use postgres, but I curse the lack of this feature regularly.
[+] rpedela|11 years ago|reply
It is looking like some form of upsert will make it into 9.5, but not confirmed yet.
[+] pornel|11 years ago|reply
A big problem I've encountered was MySQL-specific functions used in client code.

Fortunately there was a project that reimplemented many of these functions in Postgres:

https://github.com/pornel/mysqlcompat

[+] chx|11 years ago|reply
There was but the last commit is from 2011?
[+] mihailshumilov|11 years ago|reply
Thanks for Your comments It's really very important for me I think that next version of converter will be supported raw dump format