Add GET DIAGNOSTICS ... PG_CONTEXT in PL/PgSQL This adds the ability to get the call stack as a string from within a PL/PgSQL function, which can be handy for logging to a table, or to include in a useful message to an end-user.
Pavel Stehule, reviewed by Rushabh Lathia and rather heavily whacked around by Stephen Frost. Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/831283256796d1c20858862b568d73e505eb4a84 Modified Files -------------- doc/src/sgml/plpgsql.sgml | 57 +++++++++++++++++++++++++++ src/backend/utils/error/elog.c | 69 +++++++++++++++++++++++++++++++++ src/include/utils/elog.h | 2 + src/pl/plpgsql/src/pl_exec.c | 10 +++++ src/pl/plpgsql/src/pl_funcs.c | 2 + src/pl/plpgsql/src/pl_gram.y | 6 +++ src/pl/plpgsql/src/pl_scanner.c | 1 + src/pl/plpgsql/src/plpgsql.h | 1 + src/test/regress/expected/plpgsql.out | 48 +++++++++++++++++++++++ src/test/regress/sql/plpgsql.sql | 33 ++++++++++++++++ 10 files changed, 229 insertions(+) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers