Re: MySQL -> Postgres migration tools?

From: Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>
To: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
Cc: Erik Jones <ejones(at)engineyard(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: MySQL -> Postgres migration tools?
Date: 2010-01-23 16:05:59
Message-ID: 2f4958ff1001230805r58a870fbl598e556f808cd0e1@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2010/1/23 Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>:
>
> An InnoDB `AUTO_INCREMENT' column under MySQL 5.x is pretty similar to a
> sequence.
>
> I increasingly think it's pretty safe to just
>  's/AUTO_INCREMENT/SERIAL/g'
> in DDL. Apps that use MyISAM aren't going to be fussy about how it works,
> and apps that use InnoDB get Pg-like behaviour anyway.

Yes, but I have seen it many times, where people needed a sequence
that drives more than just one column/table. Can't do it with the
simplistic mysql approach.

> Modern (5.x-something-late) MySQL with the InnoDB storage engine is a very
> different beast from MySQL 3.x/4.x or MySQL 5.x with MyISAM. It still has
> some scary data-conversion habits and you need to turn on several different
> kinds of strict modes and behave-standard-ways modes to get it to play nice,
> but if you have and you're moving over to Pg you shouldn't actually have too
> rough a time.
>
> ( Unless you use some of the MySQL features, like its upsert command REPLACE
> or the INSERT ... ON DUPLICATE KEY UPDATE ..., that just have no equivalent
> in Pg. Or you're relying on scary MySQL-isms like 0000-00-00 dates. ).

this is easily done with triggers, and again is more powerful. MySQL
was designed to be easy to grasp for someone with limited time/skill
in SQL.
And as everything that is meant to be simple, it fails quickly if you
need to use it for something more realistic/complete/insert your word
here.

Lets be honest, people use mysql with the default backend usually,
because innodb is just too slow.
I dumped mysql long time ago, but I still hear from people that it
suffers from same problems. Hence, I still recommend people to switch
to postgresql.

Btw, if you want to help, please ask as many hosting places as you can
about postgresql support, mentioning that you would probably buy it
from them, if they had postgresql for the same price as mysql (read,
for free, included in cheapest package usually). This is so far the
biggest problem to overcome, and the major reason people choose mysql
in first place.

--
GJ

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Raymond O'Donnell 2010-01-23 16:11:17 Re: Old/New
Previous Message Alessandro Agosto 2010-01-23 15:52:36 [LibPQ] Trying PQconnectStart: it doesn't seem to connect