Subject Re: [Firebird-Architect] Re: NOT UPDATABLE fields
Author Dmitry Yemanov
"Ann W. Harrison" <aharrison@...> wrote:
>
> > 1) No need to copy the record to/from OLD/NEW
>
> How does the condition in the WHEN clause get evaluated if the record is
> not copied?

You're right, thanks for the correction.

> > 2) No need to execute a trigger at all (nested looper call and
savepoints
> > creation are avoided)
>
> The trigger is specified as occurring after update. How can we avoid
> doing the update, thus creating the undo log?

Why should we avoid an update? The WHEN clause means we could avoid a
trigger call, that's it.

1) execute before update trigger(s)
2) update the record
3) evaluate WHEN condition using both OLD and NEW
4) upon result of (3) either execute this after update trigger or not

Do I miss anything obvious here?


Dmitry