Subject Re: [ib-support] Trigger for "AFTER INSERT" and "AFTER UPDATE"
Author Ann W. Harrison
At 12:14 PM 12/20/2000 +0100, Hug wrote:

>I need to make an action everytime a table T changes (both, on insert a new
>record and on modify an old record).
>So, it seems logical to create a "trigger for T after insert" and a "trigger
>for T after update", both with the same body (repeating identical block of
>statements). But this isn't structured/modular programming...
>Is there a way to simplify this? (something as "trigger for T after (insert
>AND update)" sintax)

Not yet.

>Or must I create an independent procedure -with the statements- and to
>execute it from both triggers?

That seems like the most sanitary way to do it. Performance should
not be a problem and you have one copy of the code.


We have answers.