Re: Trying to load MySQL data - Mailing list pgsql-general

From Merlin Moncure
Subject Re: Trying to load MySQL data
Date
Msg-id b42b73150701111124w6c61362bu4d5c43d75531691c@mail.gmail.com
Whole thread Raw
In response to Re: Trying to load MySQL data  (Bruce Momjian <bruce@momjian.us>)
List pgsql-general
On 1/11/07, Bruce Momjian <bruce@momjian.us> wrote:
> Merlin Moncure wrote:
> > On 1/10/07, Dimitri Fontaine <dim@dalibo.com> wrote:
> > > Hi,
> > >
> > > Le mercredi 10 janvier 2007 02:54, garrettmoore@gmail.com a ?crit:
> > > > I am working on a project where we are converting from MySQL to
> > > > Postgres. I figured the easiest way would be to export the MySQL data
> > > > as CSV.
> >
> > If you are using pg 8.2+, I've had good luck with the following:
> >
> > 1. create pgsql schema by hand or using some method, so they match mysql
> > 2. mysqldump --compatible=postgresql [yadda] | grep ^INSERT | psql [yadda]
>
> Wow, mysqldump has a postgresql compatibility mode?  Intersting.

It does (had it for years), but it doesn't do very much...fixes the
quotes and a couple of other  things.  In particular I know of no easy
ways to convert the table schemas without use of external tools.

merlin

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Checkpoint request failed on version 8.2.1.
Next
From: Tom Lane
Date:
Subject: Re: ORDER BY col is NULL in UNION causes error?