Load Mysql table CSV into postgresql

Поиск
Список
Период
Сортировка
От Adarsh Sharma
Тема Load Mysql table CSV into postgresql
Дата
Msg-id CAGx-QqL_qLpM16EQGq4eoxcJ5S8jKrhS7rU0exDgyeMizGaOeA@mail.gmail.com
обсуждение исходный текст
Ответы Re: Load Mysql table CSV into postgresql  (Adrian Klaver <adrian.klaver@gmail.com>)
Re: Load Mysql table CSV into postgresql  (Thomas Kellerer <spam_eater@gmx.net>)
Список pgsql-general
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 :

test=# copy jobs from '/tmp/test.csv' with DELIMITER AS  ',' QUOTE '"' NULL AS '\N' ESCAPE E'\\' CSV;
ERROR:  invalid byte sequence for encoding "UTF8": 0xc7 0x3c
CONTEXT:  COPY jobs, line 259


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 :

http://www.perlmonks.org/?node_id=942765 , but still the same error.

My doubt is in this table there is one MEDIUMBLOB that i used as BYTEA in postgresql. Is it was due to that or anyone fixed this issue earlier , plz update.


Thanks

В списке pgsql-general по дате отправления:

Предыдущее
От: Ray Cote
Дата:
Сообщение: Database performs massive reads when I'm doing writes.
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Load Mysql table CSV into postgresql