public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: me nefcanto <[email protected]>
Cc: Greg Sabino Mullane <[email protected]>
Cc: David G. Johnston <[email protected]>
Cc: [email protected]
Subject: Re: Please implement a catch-all error handler per row, for COPY
Date: Sun, 02 Mar 2025 23:07:27 -0500
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>

me nefcanto <[email protected]> writes:
> 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.

You are wrong.  See

https://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=d9f7f5d32

https://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=9e2d87011

and a ton of related commits.

It's possible that the specific case of unique-index violations
could be handled in a similar style.  But "catch any error whatever"
is simply not going to happen here, because a subtransaction per
row is not practical.

			regards, tom lane






view thread (8+ 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]
  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