Re: Add encoding support to COPY - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Add encoding support to COPY
Date
Msg-id 23838.1247673855@sss.pgh.pa.us
Whole thread Raw
In response to Add encoding support to COPY  (David Blewett <david@dawninglight.net>)
Responses Re: Add encoding support to COPY  (David Blewett <david@dawninglight.net>)
List pgsql-hackers
David Blewett <david@dawninglight.net> writes:
> 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:

What is the point?  You'd generally have client_encoding set correctly
for your usage anyway, and if you did not, the data could confuse your
client-side code terribly.  Offering an option to let the backend send
data in the "wrong" encoding does NOT seem like a good idea to me.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Zdenek Kotala
Date:
Subject: Re: [GENERAL] pg_migrator not setting values of sequences?
Next
From: Tom Lane
Date:
Subject: Re: [GENERAL] pg_migrator not setting values of sequences?