Add encoding support to COPY

Поиск
Список
Период
Сортировка
От David Blewett
Тема Add encoding support to COPY
Дата
Msg-id 9d1f8d830907150851u555e8445w4424584a9d14410@mail.gmail.com
обсуждение исходный текст
Ответы Re: Add encoding support to COPY  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Add encoding support to COPY  (Nagy Karoly Gabriel <nagy.karoly@expert-erp.net>)
Список pgsql-hackers
Today on IRC, someone was wondering what the preferred method of
exporting data in a specific encoding via COPY was. They reply was
wrapping the COPY command in "set client_encoding='foo';", which made
me wonder how hard it would be to add an additional WITH parameter to
the actual COPY statement to specify the encoding, a la:
[ [ WITH ]         [ BINARY ]         [ OIDS ]         [ DELIMITER [ AS ] 'delimiter' ]         [ ENCODING [ AS ]
'charset']         [ NULL [ AS ] 'null string' ]         [ CSV [ HEADER ]               [ QUOTE [ AS ] 'quote' ]
      [ ESCAPE [ AS ] 'escape' ]               [ FORCE QUOTE column [, ...] ]
 

Any objections? It seems like a cleaner solution client side than
issuing multiple calls to set the client_encoding. If there are no
objections, I can attempt to prepare a patch for the next commitfest.

David Blewett


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: more than one index in a single heap pass?
Следующее
От: Zdenek Kotala
Дата:
Сообщение: Re: [GENERAL] pg_migrator not setting values of sequences?