--- "D. Richard Hipp" <[EMAIL PROTECTED]> wrote:

> Peter Bartholdsson wrote:
> > Think the topic explains it but there any way to enable recursive
> triggers?
> > Aka, triggers that run as result of a change by a trigger.
> > 
> 
> Recursive triggers are on the todo list.  They are a prerequisite
> for the planned implementation of foreign keys.
> 
> One stubling block with recursive triggers is that a recursive
> trigger can result in an infinite loop.  I sent out a query a
> month or so ago requesting ideas on how to detect and deal with
> infinite loops in recursive triggers.  I got a few helpful
> responses.  More input would be appreciated.

I believe this is roughly equivalent to deadlock. It should
best be dealt with in the same manner.

That said, the simplest way to handle it is limiting the depth
of recursion. It's simple to implement using a counter. The drawback
being the user must calculate and set the depth.

A more flexible option might just be to let the limit on resources
handle it. Memory limits will set the upper bound on recursion.
As long as you can gracefully handle and recover from that condition
it should be fine.

There are more complicated solutions but I personally doubt they're
worth the effort.

=====

---------------------------------

"Lord Tarlington gazed upon the crazed Egyptian hieroglyphics on the walls of 
the ancient tomb of the petrified pharaoh, he vowed there would be no curse on 
him like on that other Lord, unless you count his marriage to Lady Tarlington 
who, when the lost treasure was found, will be dumped faster than that basket 
in the bulrushes."
  Melissa Rhodes
---------------------------------

The Castles of Dereth Calendar: a tour of the art and architecture of Asheron's 
Call
http://www.lulu.com/content/77264


                
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - 250MB free storage. Do more. Manage less. 
http://info.mail.yahoo.com/mail_250

Reply via email to