Re: Re: [patch] Include detailed information about a row failing a CHECK constraint into the error message
Anssi Kääriäinen <anssi.kaariainen@thl.fi>
From: Kääriäinen Anssi <anssi.kaariainen@thl.fi>
To: Jan Kundrát <jkt@flaska.net>, Robert Haas <robertmhaas@gmail.com>
Cc: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2011-11-10T14:27:57Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Don't assume that a tuple's header size is unchanged during toasting.
- b07b2bdc570c 9.0.6 cited
"""
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 primary key in INSERT).
- The table might lack PK constraint (skip the detail in this case?)
- Anssi