From: | Thomas Kellerer <spam_eater(at)gmx(dot)net> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Load Mysql table CSV into postgresql |
Date: | 2013-06-06 22:03:30 |
Message-ID: | kor0vc$trc$1@ger.gmane.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Ray Cote | 2013-06-06 22:15:18 | Re: Database performs massive reads when I'm doing writes. |
Previous Message | Tom Lane | 2013-06-06 21:59:25 | Re: User postgres unable to revoke privileges? |