Subject | Re: [firebird-support] Triggers - One big or more smaller? |
---|---|
Author | Dalton Calford |
Post date | 2017-06-28T16:22:04Z |
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' liviuslivius@... [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?
Sent: June 28, 2017 12:07:53 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Triggers - One big or more smaller?
Hi,
2. you can simply disable it without altering content
3. simplify editing by minimize toxicity
regards,
Karol Bieniaszewski
-----Oryginalna wiadomość-----
From: Gabor Boros mlnglsts@... [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
<*> 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:
firebird-support-digest@yahoogroups.com
firebird-support-fullfeatured@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/
>>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 mlnglsts@... [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
<*> 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:
firebird-support-digest@yahoogroups.com
firebird-support-fullfeatured@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/