Re: Load Mysql table CSV into postgresql - Mailing list pgsql-general

From Thomas Kellerer
Subject Re: Load Mysql table CSV into postgresql
Date
Msg-id kor0vc$trc$1@ger.gmane.org
Whole thread Raw
In response to Load Mysql table CSV into postgresql  (Adarsh Sharma <eddy.adarsh@gmail.com>)
List pgsql-general
Adarsh Sharma wrote on 06.06.2013 19:33:
> Hi,
>
> Today i  need to load some mysql ( 5.1.58 ) tables dump in postgresql
> ( PG 9.2 ). I loaded few tables successfully but while loading one
> table i am facing below error :
>
> After some research , i think it is failing because Mysql table has
> character set latin1 format and PG9.2 has by deafult UTF-8 format.
> But don't understand how other tables got successfully loaded. Below
> link tells to use iconv :
>

To copy data from one DBMS to another you might want to have a look at
my tool SQL Workbench/J

The export/import feature is especially tailored for things like that
including BLOB data that can be handled by plain text exports and imports.

http://www.sql-workbench.net/manual/command-export.html
http://www.sql-workbench.net/manual/command-import.html

If you have both systems up and running you can directly copy the data
from one table to another without the need for an intermediate file

http://www.sql-workbench.net/manual/command-copy.html

The import won't be as fast as Postgres' native copy command
but it is usable I think.

Everyting can be put into a script and run through a shell script/batch
file if needed to automate the migration.

Regards
Thomas

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: User postgres unable to revoke privileges?
Next
From: Ray Cote
Date:
Subject: Re: Database performs massive reads when I'm doing writes.