Subject Re: Recursive Triggers
Author sdbeames
Thanks Alexandre,

> >Is it possible to temporarily disable an after update trigger
> >from within itself to prevent recursion where the trigger
> >causes further edits to the same table?

> Anyway but how will you enable the trigger again if the
> trigger won't be fired ?

I was hoping to do <disable self> <update table> <enable self>
all within the trigger.

> I would creaet a flag column on the table, and set the value to
> processed on the view, and in the view check if the flag column is
> marked so don't procecess it again.

If I understand your suggestion correctly, the trigger will still be
fired for each record that is updated after the first trigger fires.
Only 1 simple update need be performed on each subsequent record.

I could create a seperate table to record this event though.
I'll probably take this approach. My aim is to minimise the size of
an eventually very large table (multiple activities recorded for
multiple staff for years to come).

Is it worth my suggesting the disable/enable trigger option for a
future version? Or some sort of global variables to record flags or
states? Or do they already exist?

Cheers,
Steve