public inbox for [email protected]  
help / color / mirror / Atom feed
From: Laurenz Albe <[email protected]>
To: me nefcanto <[email protected]>
To: Greg Sabino Mullane <[email protected]>
Cc: David G. Johnston <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: [email protected]
Subject: Re: Please implement a catch-all error handler per row, for COPY
Date: Mon, 03 Mar 2025 09:55:03 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAEHBEOBAYsELbjC7KvifHk00jNVJvCRpZkHDML9ebsP48g4w+A@mail.gmail.com>
References: <CAEHBEOCqqkSitU5gx=8aHD3ZeLtRy-1eC=Xs=xB-thFNR9JpYA@mail.gmail.com>
	<[email protected]>
	<CAKFQuwbRCWP2DMHyW1LABuWAjDFVGE4mPJNfXOeTqzMpeBQ_Hw@mail.gmail.com>
	<CAKAnmm+OvPKF5p1vZ1FNs1AidJvBriT_+XBz8UZBpsNy7qiHWQ@mail.gmail.com>
	<CAEHBEOBAYsELbjC7KvifHk00jNVJvCRpZkHDML9ebsP48g4w+A@mail.gmail.com>

On Mon, 2025-03-03 at 07:14 +0330, me nefcanto wrote:
> The point is, that there is already an `on_error ignore` clause there. This means that
> somewhere there is a try/catch per row. If I'm wrong, please let me know.

The crucial point that Tom referred to is the "per row".  What is a row?

Imagine you have a COPY FROM statement for a table with three columns,
and the data look like this:

1,Smith,John
2,Lewis,Jerry
Lee
3,Prince
4,Albe,Laurenz

We may be able to guess what is meant, but how shall the machine know
where the line boundaries are, which data to ignore and which to process?

Currently, that is no problem, because errors are only identified
after the data have been successfully parsed.

Yours,
Laurenz Albe






view thread (8+ messages)

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]
  Subject: Re: Please implement a catch-all error handler per row, for COPY
  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