Subject | Re: [Firebird-Architect] Re: NOT UPDATABLE fields |
---|---|
Author | Ann W. Harrison |
Post date | 2005-02-28T16:25:31Z |
Dmitry Yemanov wrote:
comparing this syntax from the 99 standard:
not copied?
doing the update, thus creating the undo log?
specification on trigger execution. That seems most unwise.
Regards,
Ann
comparing this syntax from the 99 standard:
>>>CREATE TRIGGER bla ON myTable AFTER UPDATEwith this syntax which we currently support:
>>>WHEN old.protectedCol1 IS DISTINCT FROM new.protectedCol1
>>>OR old.protectedCol2 IS DISTINCT FROM new.protectedCol2
>>>AS BEGIN
>>> RAISE myException;
>>>END
>>CREATE TRIGGER blah ON mytable AFTER UPDATEHow does the condition in the WHEN clause get evaluated if the record is
>>AS BEGIN
>> IF ((old.protectedCol1 IS DISTINCT FROM new.protectedCol1)
>> OR (old.protectedCol2 IS DISTINCT FROM new.protectedCol2))
>> THEN RAISE myException;
>>END
>
>
> 1) No need to copy the record to/from OLD/NEW
not copied?
> 2) No need to execute a trigger at all (nested looper call and savepointsThe trigger is specified as occurring after update. How can we avoid
> creation are avoided)
doing the update, thus creating the undo log?
>It appears that you are suggesting that we ignore the before/after
specification on trigger execution. That seems most unwise.
Regards,
Ann