Search Postgresql Archives

Re: How to fire triggers just on "top" level DML

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"A.M." <agentm@xxxxxxxxxxxxxxxxxxxxx> wrote:
 
> If you do implement TG_DEPTH, I am curious as to what the
> difference between TG_DEPTH==34 and TG_DEPTH==35 could mean. I
> think it might cause poor coding practice in making decisions
> based off assumed trigger order execution. Since you only care to
> distinguish between depth 1 and depth 2 (and not beyond), could
> you elaborate on a use case where further trigger "depth"
> information may be useful?
 
Well, our current trigger engine in the Java tier keeps a count like
that and has a depth limit to protect against runaway recursion. 
The only time we hit it was in purge logic, which is extremely
convoluted due to requirements of statutes, supreme court rules, and
auditor requirements.  :-/  I might just put some sort of depth
check into triggers fired during purges, to provide a more
informative message than I might otherwise get.
 
-Kevin

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux