Andres Freund <andres@anarazel.de> writes:
> On 2023-11-08 13:18:39 -0500, Tom Lane wrote:
>> I think an actually usable feature of this sort would involve
>> copying all the failed lines to some alternate output medium,
>> perhaps a second table with a TEXT column to receive the original
>> data line.
> If we go in that direction, we should make it possible to *not* use such a
> table as well, for some uses it'd be pointless.
Why? You can always just drop the errors table if you don't want it.
But I fail to see the use-case for ignoring errors altogether.
> Another way of reporting errors could be for copy to return invalid input back
> to the client, via the copy protocol.
Color me skeptical. There are approximately zero clients in the
world today that could handle simultaneous return of data during
a COPY. Certainly neither libpq nor psql are within hailing
distance of being able to support that. Maybe in some far
future it could be made to work --- but if you want it in the v1
patch, you just moved the goalposts into the next county.
regards, tom lane