Re: BUG #15666: Seemingly incorrect error reporting/logging forviolation of non-null constraint - Mailing list pgsql-bugs

From Dirkjan Ochtman
Subject Re: BUG #15666: Seemingly incorrect error reporting/logging forviolation of non-null constraint
Date
Msg-id CAKmKYaDsKeOsgffD-22p_Bn8Sb0874DfHsrkbNk9qZnc6j0V=w@mail.gmail.com
Whole thread Raw
In response to Re: BUG #15666: Seemingly incorrect error reporting/logging for violation of non-null constraint  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Mon, Mar 4, 2019 at 3:27 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Well, maybe it isn't.  That DETAIL line would report all the columns of the
table, in their physical order.  That doesn't necessarily have anything to
do with the original INSERT, which --- if it has a column list, as this
does --- can choose to target any subset of the columns in any order.

We can't very well order the DETAIL to match the original INSERT, since
it's entirely possible that the complaint is about a column not even
mentioned in the INSERT.

That makes sense to me. Maybe it would be feasible to label the failing row values with their column's name?

It also might be just my brain being paranoid -- not sure if others find this as confusing as I did.

pgsql-bugs by date:

Previous
From: Amit Langote
Date:
Subject: Re: BUG #15662: Row update in foreign partition does not move rowbased on partition key
Next
From: Andres Freund
Date:
Subject: Re: BUG #15665: ERROR: could not load library"/usr/pgsql-11/lib/oracle_fdw.so"