Skip site navigation (1) Skip section navigation (2)

Re: MySQL to Postgresql schema conversion

From: Chris <dmagick(at)gmail(dot)com>
To: Sean Davis <sdavis2(at)mail(dot)nih(dot)gov>
Cc: pgsql <pgsql-general(at)postgresql(dot)org>
Subject: Re: MySQL to Postgresql schema conversion
Date: 2008-09-30 23:16:24
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
Sean Davis wrote:
> There are a number of mysql to postgresql converters available, but
> many of them have significant shortcomings.  Has anyone found a tool
> that works well?  I am trying to convert a couple of relatively large,
> public schema to postgresql.

I couldn't find anything either but ended up using a pretty simple approach:

- table only dump from mysql (ie no data)
- convert is using sed/perl/whatever takes your fancy
- do a "csv" type dump from mysql (select into outfile) (1/3 of the way 
down on
- use "copy" to import the data into postgres 

That of course assumes you don't have to do any data munging in the 
middle (eg different formats for date/time fields).

Postgresql & php tutorials

In response to

pgsql-general by date

Next:From: Rafael DomicianoDate: 2008-10-01 00:54:09
Subject: Re: [GENERAL] Functions
Previous:From: Scott MarloweDate: 2008-09-30 23:05:41
Subject: Re: Free Cache Memory (Linux) and Postgresql

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group