Subject Re: [ib-support] Re: assign same trigger to different tables
Author Ivan Prenosil
> From: Thomas Steinmaurer
> > > Btw, if you want to track *committed* changes, then use AFTER
> > [OPERATION]
> > > triggers instead of BEFORE [OPERATION] triggers.
> >
> > I do not believe that AFTER [OPERATION] has anything to do with
> > COMMITting -
> > they will fire just, eh, after the operation :)
>
> Consistent would be the better term ;-). Tracking changes in a
> BEFORE [OPERATION] trigger would mean, that data which for example
> don't fulfill a CHECK constraint would be tracked too ...

AFTER trigger is definitely better because you can be sure
that all BEFORE triggers already fired.

OTOH if CHECK constraint does not pass, then all work done in BEFORE
triggers will be undone anyway, so nothing will be tracked
(unless you use out-of-transaction-control mechanism for tracking,
like external tables).

Ivan
http://www.volny.cz/iprenosil/interbase