I prefer more smaller triggers with a specified firing order, along with code at the beginning of the trigger that checks to see if the trigger should fire or not - this allows you to disable a trigger within the scope of a single transaction ie.
(a) Update master table that trigger checks - turning off the trigger within this transaction (b) Perform work that would normally be stopped by the trigger (c) change the value in the master table, turning the trigger back on (d) commit. This means you can turn on and off triggers within a large system without impacting other users. ________________________________ From: firebird-support@yahoogroups.com <firebird-support@yahoogroups.com> on behalf of 'livius' liviusliv...@poczta.onet.pl [firebird-support] <firebird-support@yahoogroups.com> Sent: June 28, 2017 12:07:53 PM To: firebird-support@yahoogroups.com Subject: Re: [firebird-support] Triggers - One big or more smaller? Hi, >>practical benefit to breaking up triggers? 1. separate code logically like procedure 2. you can simply disable it without altering content 3. simplify editing by minimize toxicity regards, Karol Bieniaszewski -----Oryginalna wiadomość----- From: Gabor Boros mlngl...@bgss.hu [firebird-support] Sent: Wednesday, June 28, 2017 2:27 PM To: firebird-support@yahoogroups.com Subject: [firebird-support] Triggers - One big or more smaller? Hi All, The table have a BEFORE UPDATE trigger. Now I need a check before the existing trigger code and raise an exception if needed. I can write the check into the existing trigger before the existing code. But can create a new trigger with a lower position than the existing one. Is there any practical benefit to breaking up triggers? Gabor ------------------------------------ ------------------------------------ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Visit http://www.firebirdsql.org and click the Documentation item on the main (top) menu. Try FAQ and other links from the left-side menu there. Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ------------------------------------ Yahoo Groups Links --- Ta wiadomość została sprawdzona na obecność wirusów przez oprogramowanie antywirusowe Avast. https://www.avast.com/antivirus ------------------------------------ ------------------------------------ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Visit http://www.firebirdsql.org and click the Documentation item on the main (top) menu. Try FAQ and other links from the left-side menu there. Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ------------------------------------ Yahoo Groups Links