Re: BUG #15666: Seemingly incorrect error reporting/logging for violation of non-null constraint

From: Dirkjan Ochtman <dirkjan(at)ochtman(dot)nl>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15666: Seemingly incorrect error reporting/logging for violation of non-null constraint
Date: 2019-03-04 15:47:05
Message-ID: CAKmKYaDsKeOsgffD-22p_Bn8Sb0874DfHsrkbNk9qZnc6j0V=w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Mar 4, 2019 at 3:27 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Andres Freund 2019-03-04 17:18:40 Re: BUG #15665: ERROR: could not load library "/usr/pgsql-11/lib/oracle_fdw.so"
Previous Message Amit Langote 2019-03-04 15:12:25 Re: BUG #15662: Row update in foreign partition does not move row based on partition key