Tom Lane <tgl@sss.pgh.pa.us> writes:
> I think this is sufficient though, and that database designers ought to
> choose helpful names for constraints. I should have said something like
> ... constraint "f1 must be positive" check (f1 > 0)
> if I were concerned about the error message quality.
Consider the case of a query like
"INSERT INTO foo (SELECT ... FROM baz)"
or
"UPDATE foo set x = func(y,z)"
It's great to know which constraint was violated but that doesn't really help
you figure out *why* it was violated.
--
greg