Re: Re: [patch] Include detailed information about a row failing a CHECK constraint into the error message - Mailing list pgsql-hackers

From Kääriäinen Anssi
Subject Re: Re: [patch] Include detailed information about a row failing a CHECK constraint into the error message
Date
Msg-id BC19EF15D84DC143A22D6A8F2590F0A78864133112@EXMAIL.stakes.fi
Whole thread Raw
In response to Re: Re: [patch] Include detailed information about a row failing a CHECK constraint into the error message  (Jan Kundrát <jkt@flaska.net>)
List pgsql-hackers
"""
What I want to find in the end is something which tells me "this row
causes the error". Unfortunately, as the new row of the table with the
constraint is not yet on disk, it doesn't really have its own ctid, and
therefore I cannot report that. (Which makes sense, obviously.)
"""

Would an error with the row's PK value be useful? Something like "row
with primary key 'pk_val' fails check 'foo_check'". That would be limited
in size, yet give some context.

There are two problems I can see: - The PK value doesn't necessarily identify the row in any useful   manner (SERIAL
primarykey in INSERT). - The table might lack PK constraint (skip the detail in this case?) 
- Anssi

pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Disable OpenSSL compression
Next
From: Tom Lane
Date:
Subject: Re: Re: [patch] Include detailed information about a row failing a CHECK constraint into the error message