Quoth Nicolas Williams <nicolas.willi...@oracle.com>, on 2011-01-07 19:12:13 
-0600:
> But the real problem is that my triggers will just recurse infinitely,
> since I need both, AFTER INSERT and AFTER UPDATE triggers.  The AFTER
> INSERT trigger will trigger the AFTER UPDATE trigger, and that one will
> trigger itself, recursing ad naseum.  This [obviously] happens in the
> case of UPDATEs too.
> 
> I need a way to break this recursion.
> 
> One idea I'm considering is to have two columns where I have one:
[...]
> Another idea is that I could use temp triggers and temp tables instead,
[...]

Pardon me if this is too awkward, but could you not use a trivial view
(AS SELECT * FROM ...) and then make INSTEAD OF INSERT/UPDATE/DELETE
triggers on that?  The application could use the view exclusively; the
physical table would be in the background, and the view would act like
a shadow table.  (The DELETE case would just be transparent and key on
the row IDs, I expect, if you don't need to do anything there.)

   ---> Drake Wilson
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to