I think that a good and simple solution is simply
limit the level of recursivity. Maybe 16 nested
recursive calls solve 95% of the recursive needs.
Cl�udio
> 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.
>
> Example: How should SQLite deal with this:
>
> CREATE TABLE ex1(a INTEGER);
> INSERT INTO ex1 VALUES(1);
> CREATE TRIGGER tr1 AFTER UPDATE ON ex1 BEGIN
> UPDATE ex1 SET a=a+1 WHERE rowid=old.rowid;
> END;
>
> UPDATE ex1 SET a=2 WHERE a=1; -- infinite loop
> here
>
>
> --
> D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565
>
>
=====
=================================================
Sabedoria: "O FRACO PERECER�."
Sugest�o : CAI [www.cai.org.br]
=================================================
_______________________________________________________
Yahoo! Acesso Gr�tis - Instale o discador do Yahoo! agora.
http://br.acesso.yahoo.com/ - Internet r�pida e gr�tis