Re: COPY command character set

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: COPY command character set
Дата
Msg-id 5058.1252604302@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: COPY command character set  ("Peter Headland" <pheadland@actuate.com>)
Ответы Re: COPY command character set  ("Peter Headland" <pheadland@actuate.com>)
Список pgsql-general
"Peter Headland" <pheadland@actuate.com> writes:
>> 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.

The COPY command reference page saith

    Input data is interpreted according to the current client encoding,
    and output data is encoded in the the current client encoding, even
    if the data does not pass through the client but is read from or
    written to a file.

Seems clear enough to me.

            regards, tom lane

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

Предыдущее
От: "Peter Headland"
Дата:
Сообщение: Re: COPY command character set
Следующее
От: Alban Hertroys
Дата:
Сообщение: Re: query speed question