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
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/74ab96a45ef6259aa6a86a781580edea8488511a
Modified Files
--------------
doc/src/sgml/func.sgml | 7 ++
src/backend/commands/trigger.c | 21 ++++++-
src/include/catalog/pg_proc.h | 3 +
src/include/commands/trigger.h | 2 +
src/test/regress/expected/triggers.out | 117 ++++++++++++++++++++++++++++++++
src/test/regress/sql/triggers.sql | 64 +++++++++++++++++
6 files changed, 213 insertions(+), 1 deletions(-)