Re: Transfer from MySQL to PostgreSQL

From: Christoph Frick <frick(at)sc-networks(dot)com>
To: Andrea <andrea(dot)b73(at)email(dot)it>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Transfer from MySQL to PostgreSQL
Date: 2006-03-28 10:07:22
Message-ID: 20060328100722.GZ13909@byleth.sc-networks.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message ann hedley 2006-03-28 11:04:48 delete from joined tables
Previous Message Andrea 2006-03-28 09:49:16 Transfer from MySQL to PostgreSQL