Re: COPY enhancements - Mailing list pgsql-hackers

From Tom Lane
Subject Re: COPY enhancements
Date
Msg-id 7082.1255096338@sss.pgh.pa.us
Whole thread Raw
In response to Re: COPY enhancements  (Hannu Krosing <hannu@2ndQuadrant.com>)
Responses Re: COPY enhancements  (Greg Smith <gsmith@gregsmith.com>)
List pgsql-hackers
Hannu Krosing <hannu@2ndQuadrant.com> writes:
> On Thu, 2009-10-08 at 11:32 -0400, Robert Haas wrote:
>> Another possible approach, which isn't perfect either, is the idea of
>> allowing COPY to generate a single column of output of type text[].
>> That greatly reduces the number of possible error cases, 

> maybe make it bytea[] to further reduce error cases caused by charset
> incompatibilities ?

That seems likely to be considerably less convenient and more error
prone, as it now puts it on the user to do the correct conversion.

It does bring up an interesting point for error handling though, which
is what do we do with rows that fail encoding conversion?  For logging
to a file we could/should just decree that we write out the original,
allegedly-in-the-client-encoding data.  I'm not sure what we do about
logging to a table though.  The idea of storing bytea is pretty
unpleasant but there might be little choice.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: COPY enhancements
Next
From: Greg Smith
Date:
Subject: Re: COPY enhancements