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