PostgreSQL Bugs

Collected from the PG bugs email list.

Bug ID15666
PG Version11.2
OSLinux
Opened2019-03-04 09:55:31+00
Reported byDirkjan Ochtman
StatusNew

Body of first available message related to this bug follows.

The following bug has been logged on the website:

Bug reference:      15666
Logged by:          Dirkjan Ochtman
Email address:      (redacted)
PostgreSQL version: 11.2
Operating system:   Linux
Description:        

I'm modifying the data model for the application I work on, and in the
process of doing so, I'm seeing this error:

db         | 2019-03-04 09:48:54.485 UTC [198] ERROR:  null value in column
"accountid" violates not-null constraint
db         | 2019-03-04 09:48:54.485 UTC [198] DETAIL:  Failing row contains
(14, 138962.38, 0, null, 13).
db         | 2019-03-04 09:48:54.485 UTC [198] STATEMENT:  insert into
JournalEntryRecord (accountId, amount, journalEntryId, type, id) values ($1,
$2, $3, $4, $5)

This is very confusing to me because the tuple from the "Failing row"
message clearly has the `null` in fourth position, but the error message
reports that the column "accountid" (or "accountId" -- but I understand
column names are casefolded) is the problem, which should ostensibly be the
first value from the failing row tuple (if that tuple is ordered the same
way as the statement suggests).

Messages

DateAuthorSubject
2019-03-04 09:55:31+00PG Bug reporting formBUG #15666: Seemingly incorrect error reporting/logging for violation of non-null constraint
2019-03-04 14:27:43+00Tom LaneRe: BUG #15666: Seemingly incorrect error reporting/logging for violation of non-null constraint
2019-03-04 15:47:05+00Dirkjan OchtmanRe: BUG #15666: Seemingly incorrect error reporting/logging for violation of non-null constraint