Re: Change COPY ... ON_ERROR ignore to ON_ERROR ignore_row - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: Change COPY ... ON_ERROR ignore to ON_ERROR ignore_row
Date
Msg-id CAKFQuwaYNw8U-9JkFdyOX4i4Y3J1sp6+dk-sh8YmZGCq8gMeVQ@mail.gmail.com
Whole thread Raw
In response to Re: Change COPY ... ON_ERROR ignore to ON_ERROR ignore_row  (Jim Jones <jim.jones@uni-muenster.de>)
Responses Re: Change COPY ... ON_ERROR ignore to ON_ERROR ignore_row
List pgsql-hackers
On Fri, Feb 16, 2024 at 1:16 PM Jim Jones <jim.jones@uni-muenster.de> wrote:
In case all columns of a record have been set to null due to data type
incompatibility, should we insert it at all?

Yes.  In particular not all columns in the table need be specified in the copy command so while the parsed input data is all nulls the record itself may not be.

The system should allow the user to exclude rows with incomplete data by ignoring a not null constraint violation.

In short we shouldn't judge non-usefulness and instead give tools to the user to decide for themselves.

David J.

pgsql-hackers by date:

Previous
From: John Morris
Date:
Subject: Re: Where can I find the doxyfile?
Next
From: Magnus Hagander
Date:
Subject: Re: System username in pg_stat_activity