Re: Migration from MySQL to PostgreSQL : Datatypes?

From: Mladen Gogala <mladen(dot)gogala(at)vmsinfo(dot)com>
To: "Bill P(dot)" <maxarbos(at)yahoo(dot)com>
Cc: "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Migration from MySQL to PostgreSQL : Datatypes?
Date: 2010-12-23 17:50:10
Message-ID: 4D138BD2.90208@vmsinfo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Bill P. wrote:
> Hello,
>
> What would be the best way to deal with migrating a database structure
> and data from a mysql db to postgres when there are dataypes in the
> mysql tables that are not present, and thus throw errors using the
> current migration wizard, in postgres?
>
> If i leave these few tables out on first import, many of the other
> tables that these few key back to dont get created either.
>
> I found a program called easyfrom, but it's over $200 and only runs on
> windows. Navicat, which i have, doesnt seem to have any provision to
> change the datatypes on structure sync from one to the other types of db.
>
> Any suggestions would be great.
> thanks.
>
>
I don't know how complex your schema is, but I would create the objects
manually and then use Perl scripts to copy the data. Copying shouldn't
be a problem because MySQL supports things like this:

SELECT *
INTO OUTFILE '/tmp/emp.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
FROM emp

That should be picked up quite nicely by the COPY command from PostgreSQL.

--

Mladen Gogala
Sr. Oracle DBA
1500 Broadway
New York, NY 10036
(212) 329-5251
http://www.vmsinfo.com
The Leader in Integrated Media Intelligence Solutions

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Bill P. 2010-12-23 20:48:46 Re: Migration from MySQL to PostgreSQL : Datatypes?
Previous Message Richard Broersma 2010-12-23 17:38:50 Re: Migration from MySQL to PostgreSQL : Datatypes?