From: | "Karl O(dot) Pinc" <kop(at)meme(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | REFERENCES error message complaint, suggestion |
Date: | 2004-03-03 23:13:19 |
Message-ID: | 20040303171319.A13758@mofo.meme.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
FYI,
It'd be nice if the error message from a REFERENCES
constraint mentioned the column name into which
the bad data was attempted to be inserted.
In PostgreSQL 7.3:
sandbox=> insert into foo (id, b) values (3, 2);
ERROR: b_is_fkey referential integrity violation - key referenced from
foo not found in bar
(I only know that column 'b' is involved above because I
manually gave the constraint the 'b_is_fkey' name.)
Also, IIRC, CHECK constraint violations don't contain the text of
the constraint, so you're again reduced to relying on supplied
constraint names for a clue as to what went wrong. It'd be
nice to see the constraint itself in the error message.
Karl <kop(at)meme(dot)com>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-03-03 23:21:26 | Re: Mistake in my query or Index Scan on subquery failure? (7.4) |
Previous Message | mbc | 2004-03-03 22:50:00 | clarification of postgres limitations |