public inbox for [email protected]
help / color / mirror / Atom feedFrom: Andres Freund <[email protected]>
To: Tom Lane <[email protected]>
Cc: Damir <[email protected]>
Cc: torikoshia <[email protected]>
Cc: Pgsql Hackers <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: Andrey Lepikhov <[email protected]>
Cc: Alena Rybakina <[email protected]>
Subject: Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)
Date: Wed, 8 Nov 2023 15:53:58 -0800
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <CALH1LguOY-VvJBWvjpLR2W3t0Z2p=LGSK5tzLrKwtzZ2UsqwGg@mail.gmail.com>
<[email protected]>
<CALH1LgseNT7mxpGzQsQwOJz_UwYBo6L-4vR9tmJqb-WNPkt6Bg@mail.gmail.com>
<[email protected]>
<[email protected]>
<[email protected]>
<CALH1Lgtg39crESw644KDH+ejBWuW3Vospe67F-ZWXNeBMEE=PA@mail.gmail.com>
<[email protected]! a.com>
<[email protected]>
<[email protected]>
Hi,
On 2023-11-08 13:18:39 -0500, Tom Lane wrote:
> Damir <[email protected]> writes:
> > [ v7-0002-Add-new-COPY-option-IGNORE_DATATYPE_ERRORS.patch ]
>
> Sorry for being so late to the party, but ... I don't think this
> is a well-designed feature as it stands. Simply dropping failed rows
> seems like an unusable definition for any application that has
> pretensions of robustness.
Not everything needs to be a robust application though. I've definitely cursed
at postgres for lacking this.
> 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. (Or maybe an array of text that could receive the
> broken-down field values?) Maybe we could dump the message info,
> line number, field name etc into additional columns.
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.
Another way of reporting errors could be for copy to return invalid input back
to the client, via the copy protocol. That would allow the client to handle
failing rows and also to abort if the number of errors or the type of errors
gets to be too big.
Greetings,
Andres Freund
view thread (75+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox