Re: Transfer from MySQL to PostgreSQL

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Guido Barosio <gbarosio(at)gmail(dot)com>
Cc: Christoph Frick <frick(at)sc-networks(dot)com>, Andrea <andrea(dot)b73(at)email(dot)it>, pgsql-novice(at)postgresql(dot)org
Subject: Re: Transfer from MySQL to PostgreSQL
Date: 2006-04-10 22:27:41
Message-ID: 200604102227.k3AMRg323689@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Guido Barosio wrote:
> Use SELECT ...INTO OUTFILE and treat the data as a csv while importing
> with COPY from the pgsql side.
>
>
> from mysql docs: The SELECT ... INTO OUTFILE 'file_name' form of
> SELECT writes the selected rows to a file. The file is created on the
> server host, so you must have the FILE privilege to use this syntax.
> file_name cannot be an existing file, which among other things
> prevents files such as /etc/passwd and database tables from being
> destroyed. As of MySQL 5.0.19, the character_set_filesystem system
> variable controls the interpretation of the filename.

I think you also have to be careful that NULL's are transfered cleanly
from one database to the other.

--
Bruce Momjian http://candle.pha.pa.us
EnterpriseDB http://www.enterprisedb.com

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

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2006-04-10 22:34:10 Re: Explain query on table with partition tables
Previous Message me 2006-04-10 22:16:32 Re: PostgreSQL a slow DB?