From: | Nagy Karoly Gabriel <nagy(dot)karoly(at)expert-erp(dot)net> |
---|---|
To: | David Blewett <david(at)dawninglight(dot)net> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Add encoding support to COPY |
Date: | 2009-07-15 16:59:56 |
Message-ID: | 4A5E0B0C.4070408@expert-erp.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
David Blewett wrote:
> 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
>
I think that I was the one who wondered about that. Our use case is
related to moving data between different servers which have different
encodings. Ofcourse the encoding should be an option only when COPY
involves files.
--
Nagy Karoly Gabriel
Expert Software Group SRL
(o__ 417495 Sanmartin nr. 205
//\' Bihor, Romania
V_/_ Tel./Fax: +4 0259 317 142, +4 0259 317 143
Attachment | Content-Type | Size |
---|---|---|
nagy_karoly.vcf | text/x-vcard | 265 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2009-07-15 17:01:05 | Re: [PATCH 3/3] Document geqo_seed variable. |
Previous Message | Greg Smith | 2009-07-15 16:45:18 | Re: Mysql.whynot or PG vs MySQL comparison table? |