Re: Trying to load MySQL data

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: Dimitri Fontaine <dim(at)dalibo(dot)com>, pgsql-general(at)postgresql(dot)org, "garrettmoore(at)gmail(dot)com" <garrettmoore(at)gmail(dot)com>
Subject: Re: Trying to load MySQL data
Date: 2007-01-11 19:21:15
Message-ID: 200701111921.l0BJLFi06733@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Merlin Moncure wrote:
> On 1/10/07, Dimitri Fontaine <dim(at)dalibo(dot)com> wrote:
> > Hi,
> >
> > Le mercredi 10 janvier 2007 02:54, garrettmoore(at)gmail(dot)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.

--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-01-11 19:23:18 Re: Checkpoint request failed on version 8.2.1.
Previous Message Bruce Momjian 2007-01-11 19:20:25 Re: ORDER BY col is NULL in UNION causes error?