Re: Transfer from MySQL to PostgreSQL - Mailing list pgsql-novice

From Christoph Frick
Subject Re: Transfer from MySQL to PostgreSQL
Date
Msg-id 20060328100722.GZ13909@byleth.sc-networks.de
Whole thread Raw
In response to Transfer from MySQL to PostgreSQL  (Andrea <andrea.b73@email.it>)
Responses Re: Transfer from MySQL to PostgreSQL  ("Guido Barosio" <gbarosio@gmail.com>)
List pgsql-novice
On Tue, Mar 28, 2006 at 11:49:16AM +0200, Andrea wrote:

> I have both MySQL (5.0) and PostgreSQL (8.1) database servers on my PC.
> On MySQL I have a table (very simple, only 7 char fields) filled with
> about 35000 records. On PostgreSQL I have created the same table
> structure (same fields, names, indexes, etc...). I would like to
> transfer all records from MySQL to PostgreSQL.  Which is the easiest
> and shortest way to do this??

dump the database with insert statements (maybe newer versions of
mysqldump can also dump only one table's data), remove the stuff, that
is not needed with postgres, fix the table names and so on with an
editor of your choice and run the resulting file with psql.

--
cu

Attachment

pgsql-novice by date:

Previous
From: Adam Witney
Date:
Subject: Re: Transfer from MySQL to PostgreSQL
Next
From: ann hedley
Date:
Subject: delete from joined tables