Re: COPY command character set

Поиск
Список
Период
Сортировка
От Peter Headland
Тема Re: COPY command character set
Дата
Msg-id 71F491F5DA99604A80DE49424BF3D02B0CD9A184@exchange8.actuate.com
обсуждение исходный текст
Ответ на Re: COPY command character set  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: COPY command character set  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
> set client_encoding = 'utf8';
> copy from stdin/to stdout;

What if I want to do this on the server side (because it's much, much
faster)? Does COPY use the default encoding of the database? If not,
what?

If this is a restrictive as it appears, and there are no outstanding
enhancements planned in this area, I might be interested in improving
this command to allow specifying the encoding and to have it do obvious
stuff like recognize UTF lead bytes automatically. At the very least,
the documentation needs some work to explain these subtleties.

--
Peter Headland
Architect
Actuate Corporation

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Wednesday, September 09, 2009 19:14
To: Peter Headland
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] COPY command character set

"Peter Headland" <pheadland@actuate.com> writes:
> The documentation of the COPY command does not state what character
> set(s) are recognized or written. I need to import and export UTF-8
> data; how can I do that?

set client_encoding = 'utf8';
copy from stdin/to stdout;

            regards, tom lane

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

Предыдущее
От: Michael Andreen
Дата:
Сообщение: Re: array datatype supported by Perl DBI with Postgres DBD ?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: COPY command character set