Add ENCODING option to COPY

Поиск
Список
Период
Сортировка
От Hitoshi Harada
Тема Add ENCODING option to COPY
Дата
Msg-id AANLkTimOy51EVQbL+y0aoNnpu2x02c0OnJQRh=2SP07E@mail.gmail.com
обсуждение исходный текст
Ответы Re: Add ENCODING option to COPY  (Itagaki Takahiro <itagaki.takahiro@gmail.com>)
Список pgsql-hackers
Here's the patch to add ENCODING option to COPY command.
The fundamental issue was explained months ago:

http://archives.postgresql.org/message-id/AANLkTikCt6bHXZjO_oX+JS7+G=jAQ7gVZPu0Owjcsbfb@mail.gmail.com

In short, client_encoding is not appropriate for copy operation so we
should need the specialized option for it. Robert Haas agreed with its
need later in the thread. Thanks.

The patch overrides client_encoding by the added ENCODING option, and
restores it as soon as copy is done. I see some complaints ask to use
pg_do_encoding_conversion() instead of
pg_client_to_server/server_to_client(), but the former will surely add
slight overhead per reading line and I believe copy is
performance-sensitive command.

I'll add this to the CF app.

Regards,

--
Hitoshi Harada

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Re: [COMMITTERS] pgsql: Exit from base backups when shutdown is requested
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Error code for "terminating connection due to conflict with recovery"