pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: dirkjan@ochtman.nl
Subject: BUG #15666: Seemingly incorrect error reporting/logging for violation of non-null constraint
Date: Mon, 04 Mar 2019 09:55:31 +0000
Message-ID: <15666-ead8afdaca9e8cc4@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      15666
Logged by:          Dirkjan Ochtman
Email address:      dirkjan@ochtman.nl
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).



view thread (3+ messages)  latest in thread

Message-ID: <15666-ead8afdaca9e8cc4@postgresql.org>
Permalink:  ../15666-ead8afdaca9e8cc4@postgresql.org/
Also on:    postgresql.org/message-id/15666-ead8afdaca9e8cc4@postgresql.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, dirkjan@ochtman.nl
  Subject: Re: BUG #15666: Seemingly incorrect error reporting/logging for violation of non-null constraint
  In-Reply-To: <15666-ead8afdaca9e8cc4@postgresql.org>
  References: <15666-ead8afdaca9e8cc4@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox