It seems very good, I can not see any drawback there. Greetings.
Walter. On Sat, Jun 1, 2013 at 1:26 AM, thp_pkmi <[email protected]> wrote: > ** > > > > > --- In [email protected], "firebirdsql" <firebirdsql@...> > wrote: > > > > I have an after update/delete trigger and would like to know if the > trigger was triggered by a cascade update/delete OR a user. Is this > possible? > > > I posted an almost similar case today, in my case I just want to > distinguish cascade delete from user/regular delete. > > Actually I have a trick to distinguish user update from cascade update. I > always put an extra field in my table called Sig (or Tag, or whatever..), > in my application I always increase Sig by 1 on every post update, then in > the before update trigger I can detect: > > if (new.Sig is distinct from old.Sig) then > ... > > and finally at the end of the trigger I restore the Sig: > new.Sig= old.Sig; > > So far it's working fine, I also wonder if there is a minus in this > mechanism, would somebody please give an advice or review on this ? > > Thanks. > > Regards, > Tjioe Hian Pin > > > [Non-text portions of this message have been removed] ------------------------------------ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Visit http://www.firebirdsql.org and click the Resources item on the main (top) menu. Try Knowledgebase and FAQ links ! Also search the knowledgebases at http://www.ibphoenix.com ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/firebird-support/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/firebird-support/join (Yahoo! ID required) <*> To change settings via email: [email protected] [email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
