Out of curiosity, why not allow recursion, but start returning warnings from
sqlite3_step indicating that the query is recursive (perhaps once it has
crossed some predefined recursion count)?  As one post mentioned, every
programming language allows you to shoot yourself in the foot with
recursion, and for precisely the reasons that make a hard limit seem
somewhat unpalatable.

Although, if hard limits are imposed, I would prefer a runtime defined
limit, so that I can change the limit based on the needs of the application,
without having to recompile the sqlite libraries.

--Keith

******************************************************
- Ever notice how 'big' isn't, compared to 'small'?

- Sounds like a Wookie; acts like mad cow.

- I'm not a professional; I just get paid to do this.

- Rules for programming:
   1.  Get it working, right?
   2.  Get it working right.

- Things I've learned about multithreaded programming:

    123...   PPArrvooottieedcc ttm  ueelvvteeirrtyyhtt
rhheiianndgge  dwi hnpi rctohhg eri aslm omscitanalgt 
 iowcbh,je engceltvo ebwrah lip,co hso srci abonlt ehb
.ee^Nr waicscee snsoetd  'aotb jtehcet -slaomcea lt'il
m^Ne from two or more threads
******************************************************

-----Original Message-----
From: Jeremy Hinegardner [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 04, 2005 8:30 AM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] Is there any way to enable recursive triggers?


On Tue, Jan 04, 2005 at 05:54:04AM -0500, D. Richard Hipp wrote:
> 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.

Graeme Birchall has an excellent book (The DB2 UDB Cookbook) available for
download.  It has an entire chapter dedicated to DB2's Recursive SQL and one
section of it is "Halting Recursive Processing".  Maybe it will provide some
insight.
                     
    http://ourworld.compuserve.com/homepages/graeme_birchall/HTM_COOK.HTM

enjoy,

-jeremy

-- 
========================================================================
 Jeremy Hinegardner                              [EMAIL PROTECTED] 

Reply via email to