Subject Re: [firebird-support] Possible bug with CHECK constraint
Author Ann W. Harrison
At 06:52 AM 10/4/2004, Ivan Prenosil wrote:

>* If somebody still thinks that it is a bug, he should clearly state
> what the solution/correct behaviour should be.

Certainly, constraints work as documented. Equally clearly, they
don't follow the standard. The 92 standard recognizes two types of
constraint, immediate and deferrable. A deferrable constraint can
be evaluated immediately or at commit time, depending on the state
of the tide, phase of the moon, and whim of the developer. Immediate
constraints are evaluated immediately AFTER the VERB. We fail both
those requirements. Our constraints are checked before the operation.

Under standard SQL, this statement will not violate a unique constraint:

update t set unique_field = unique_field + 1;

So we have long-standing code, written before the 92 standard and
widely used that doesn't follow the standard. What to do?

>

Regards,

Ann
www.ibphoenix.com
We have answers.