Re: BUG #11107: UPDATE violates table check constraint - Mailing list pgsql-bugs

From David G Johnston
Subject Re: BUG #11107: UPDATE violates table check constraint
Date
Msg-id 1406908777449-5813541.post@n5.nabble.com
Whole thread Raw
In response to Re: BUG #11107: UPDATE violates table check constraint  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #11107: UPDATE violates table check constraint
List pgsql-bugs
Tom Lane-2 wrote
> jesse.denardo@

>  writes:
>> After creating two test tables and a table check constraint on one of
>> them,
>> I use an UPDATE statement to update one of the rows. This update causes
>> the
>> row to violate the check constraint, but the update succeeds anyways.
>> Dropping and re-adding the check constraint then fails because the
>> constraint is violated.
>
> Sorry, but this check constraint has entirely undefined behavior, as does
> any check constraint that refers to data rows other than the one that is
> being checked.

Which is why PostgreSQL has CREATE TRIGGER functionality...

David J.




--
View this message in context:
http://postgresql.1045698.n5.nabble.com/BUG-11107-UPDATE-violates-table-check-constraint-tp5813528p5813541.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.

pgsql-bugs by date:

Previous
From: Andrew Sackville-West
Date:
Subject: Re: regression, deadlock in high frequency single-row UPDATE
Next
From: Marko Tiikkaja
Date:
Subject: Re: BUG #11107: UPDATE violates table check constraint