public inbox for [email protected]  
help / color / mirror / Atom feed
From: David G. Johnston <[email protected]>
To: Tom Lane <[email protected]>
Cc: me nefcanto <[email protected]>
Cc: [email protected]
Subject: Re: Please implement a catch-all error handler per row, for COPY
Date: Sat, 1 Mar 2025 09:35:54 -0700
Message-ID: <CAKFQuwbRCWP2DMHyW1LABuWAjDFVGE4mPJNfXOeTqzMpeBQ_Hw@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CAEHBEOCqqkSitU5gx=8aHD3ZeLtRy-1eC=Xs=xB-thFNR9JpYA@mail.gmail.com>
	<[email protected]>

On Sat, Mar 1, 2025 at 9:20 AM Tom Lane <[email protected]> wrote:

> me nefcanto <[email protected]> writes:
> > Can you please provide a row-level catch-all handler for the copy
> command?
>
> Very unlikely to happen.  COPY is not intended as a general purpose
> ETL mechanism, and we don't want to load it down with features that
> would create substantial performance penalties.  Which that would.
>

Maybe it isn't a general purpose ETL tool but there is no reasonable way to
do some things unless COPY can be put into a mode that doesn't have the
same performance requirements it needs to serve as our dump/restore tool of
choice.

I have to imagine such a mode, if not enabled, would have little to no
impact on how COPY behaves compared to today.  It's kinda like VACUUM FULL
existing doesn't impact how VACUUM behaves.  Seems more desirable than
inventing a whole new SQL Command to do this and copy-paste all of the COPY
code since it does mostly the same thing.

In short, it's probably worth giving it a try if someone wants to.
Rejecting it without seeing the proposal seems premature.

Now, it's probably challenging enough that if the person requesting the
feature isn't driving its development the odds of it getting worked on is
fairly low.

David J.


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]
  Subject: Re: Please implement a catch-all error handler per row, for COPY
  In-Reply-To: <CAKFQuwbRCWP2DMHyW1LABuWAjDFVGE4mPJNfXOeTqzMpeBQ_Hw@mail.gmail.com>

* 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