Subject | Re: [firebird-support] Re: Recursive Triggers |
---|---|
Author | Alexandre Benson Smith |
Post date | 2005-03-18T15:16Z |
sdbeames wrote:
that will be false, then a flag on the record will be setted, the
process will be done, so the after update trigger will be fired again,
but this time the flag will be setted so the then part of the if will
not be executed, resuming, the trigger will be fired, but no process
will occurr.
this way you won't need to do any cleanup.
Global Variables: I think will be a rdb$context function to get global
values, but don't know (or remember) the semantics and escope.
--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda.
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.7.3 - Release Date: 15/03/2005
>The view wil be fired on the update, th trigger checks for a flag value,
>
>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.
>
>
that will be false, then a flag on the record will be setted, the
process will be done, so the after update trigger will be fired again,
but this time the flag will be setted so the then part of the if will
not be executed, resuming, the trigger will be fired, but no process
will occurr.
>I could create a seperate table to record this event though.I would go for the flag where you put the current_transaction approach,
>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).
>
>
this way you won't need to do any cleanup.
>Is it worth my suggesting the disable/enable trigger option for aDisable trigger option: What about other users ? :-)
>future version? Or some sort of global variables to record flags or
>states? Or do they already exist?
>
>
Global Variables: I think will be a rdb$context function to get global
values, but don't know (or remember) the semantics and escope.
>Cheers,see you !
>Steve
>
>
--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda.
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.7.3 - Release Date: 15/03/2005