Re: COPY and Unicode...

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: COPY and Unicode...
Дата
Msg-id 21761.1127335677@sss.pgh.pa.us
обсуждение исходный текст
Ответ на COPY and Unicode...  ("Cristian Prieto" <cristian@clickdiario.com>)
Список pgsql-general
"Cristian Prieto" <cristian@clickdiario.com> writes:
> Hello, I need to import some amount of data using the COPY command, the main
> trouble I found is that the Database is in UNICODE format and the data in
> ASCII Latin-1 codepage, when I try to import it, COPY respond with:

> ERROR:  invalid byte sequence for encoding "UNICODE": 0xe9
> CONTEXT:  COPY geoip_location, line 307, column city: "Yaound"

> I've been looking into the documentation and I could not found any reference
> in copy from a distinct codepage than the used by the database, any help?

Try doing "SET client_encoding = latin1" before doing the COPY.

            regards, tom lane

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

Предыдущее
От: Douglas McNaught
Дата:
Сообщение: Re: COPY and Unicode...
Следующее
От: David Fetter
Дата:
Сообщение: Re: [pgsql-advocacy] YAPC::Israel looking for Perl/Database speakers