Re: Constraint violations don't report the value that violates - Mailing list pgsql-general

From Tom Lane
Subject Re: Constraint violations don't report the value that violates
Date
Msg-id 20248.1202342474@sss.pgh.pa.us
Whole thread Raw
In response to Constraint violations don't report the value that violates  (Russell Smith <mr-russ@pws.com.au>)
Responses Re: Constraint violations don't report the value that violates
List pgsql-general
Russell Smith <mr-russ@pws.com.au> writes:
> I've would find it useful if check constraints and unique constraints
> would give a value which is violating the constraint.

> Foreign keys give a value that is failing for the foreign key, is there
> a reason that other constraints don't do the same thing?

It's not very well-defined, for instance what would you report for

    CHECK some_black_box_function(a, b, c+d)

FKs are constrained by the spec syntax to only involve simple column
values, but this is not the case for either CHECK or unique indexes.

Unique partial indexes would make things even more interesting.

            regards, tom lane

pgsql-general by date:

Previous
From: brian
Date:
Subject: Re: Fossology Install & Config Issues...
Next
From: "Scott Marlowe"
Date:
Subject: Re: DBA Book - Not "postgresql book - practical or something newer?"