Live data from Hacker News

MySQL to PostgreSQL converter

github.com

21–30 of 37 posts

Re: MySQL to PostgreSQL converter

#21
post #12

When I saw this was a PHP project: https://dl.dropboxusercontent.com/u/31250/gifs/no-thanks.gif

Really? What does the language it's written in have to do with anything at all here?

Just because a few very disciplined people can make something clean and functional in a language does not mean it's a strength of the language. PHP is great as a template language, but when it comes to manipulating data it's somewhat louche approach to data types is a liability.

Re: MySQL to PostgreSQL converter

#22
post #8

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.

Seconded. Used pgloader to turn a massive mysql database into postgres. Turned out great.

Re: MySQL to PostgreSQL converter

#23
post #8

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.

Upvote for pgloader. Moving data from SQL Server into Postgres with PGLoader has been fairly seamless and the maintainer is very responsive on Github.

Re: MySQL to PostgreSQL converter

#28
post #25

I find the more difficult issue to be rewriting bulk "insert ignore" and "on duplicate key" queries.

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.

Which other databases support "insert ignore"?

Re: MySQL to PostgreSQL converter

#29
post #8

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.

+1 pgloader.

Re: MySQL to PostgreSQL converter

#30
post #8

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.

Upvote for pgloader. Moving data from SQL Server into Postgres with PGLoader has been fairly seamless and the maintainer is very responsive on Github.

There doesn't seem to be any mention of SQL Server on the site? I am in the process of researching a move to Postgres from SQL Server, so if you have any other info on how you achieved this that'd be very much appreciated.

EDIT I see it now. Still, anything that you think useful would be great :)

Post reply on HN