Re: Load Mysql table CSV into postgresql

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: Adarsh Sharma <eddy(dot)adarsh(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Load Mysql table CSV into postgresql
Date: 2013-06-06 21:53:07
Message-ID: 51B104C3.7090401@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 06/06/2013 12:58 PM, Adarsh Sharma wrote:
> Thanks Adrian , i think it works but still facing problem while loading
> Mysql ( MEDIUMBLOB ) column into PG ( BYTEA ) column :
>
> test=# \encoding LATIN1;
> test=# copy jobs from '/tmp/test.csv' with DELIMITER AS ',' QUOTE '"'
> NULL AS '\N' ESCAPE E'\\' CSV;
> ERROR: invalid input syntax for type bytea
> CONTEXT: COPY jobs, line 259, column wf_instance:
> "\0$0000000-120805203721153-oozie-oozi-W\0\0)<?xml version="1.0"
> encoding="UTF-8" standalone="no"?><..."
> test=#
>
> wf_instance is single mediumblob column in the table.

I have not done that conversion. All I can do is point you at this link,
courtesy of Google:

http://dba.stackexchange.com/questions/4211/how-to-migrate-large-blob-table-from-mysql-to-postgresql

Others on the list may have better ideas.

>
> Cheers

--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2013-06-06 21:59:25 Re: User postgres unable to revoke privileges?
Previous Message Jeff Janes 2013-06-06 21:41:00 Re: Database performs massive reads when I'm doing writes.