Re: Determine the name of the calling function

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Determine the name of the calling function
Дата
Msg-id 20165.1358466237@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Determine the name of the calling function  (Jack Kaufman <jack.kaufman@sanmina.com>)
Ответы Re: Determine the name of the calling function  (Jack Kaufman <jack.kaufman@sanmina.com>)
Список pgsql-novice
Jack Kaufman <jack.kaufman@sanmina.com> writes:
> How do I programmatically determine, from a sub-function, the name of the
> calling function?

There's not really any built-in way to do that.

If you are sufficiently desperate, I think it'd work to throw an
exception, catch it, and look into the PG_EXCEPTION_CONTEXT text to pull
out the function name the right number of levels up.  This is likely to
be expensive though.

            regards, tom lane


В списке pgsql-novice по дате отправления:

Предыдущее
От: Jack Kaufman
Дата:
Сообщение: Determine the name of the calling function
Следующее
От: Jack Kaufman
Дата:
Сообщение: Re: Determine the name of the calling function