Subject | Re: [ib-support] Re: assign same trigger to different tables |
---|---|
Author | Ivan Prenosil |
Post date | 2002-03-07T14:15:53Z |
> From: Thomas SteinmaurerAFTER trigger is definitely better because you can be sure
> > > 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 ...
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