On 8/1/14 5:59 PM, David G Johnston wrote:
> Tom Lane-2 wrote
>> 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...
Which does absolutely nothing to get rid of the race conditions.
.marko