Add pg_trigger_depth() function
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Wed, 25 Jan 2012 16:15:29 +0000 (13:15 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Wed, 25 Jan 2012 16:22:54 +0000 (13:22 -0300)
commit74ab96a45ef6259aa6a86a781580edea8488511a
tree92415eea1e32bb33c68b9fdbbdc5c57732d78c68
parent6d5aae7afacc564ead2af88c76b13cfc55750556
Add pg_trigger_depth() function

This reports the depth level of triggers currently in execution, or zero
if not called from inside a trigger.

No catversion bump in this patch, but you have to initdb if you want
access to the new function.

Author: Kevin Grittner
doc/src/sgml/func.sgml
src/backend/commands/trigger.c
src/include/catalog/pg_proc.h
src/include/commands/trigger.h
src/test/regress/expected/triggers.out
src/test/regress/sql/triggers.sql