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.