Can a nested function determine it is being called within a trigger?

Поиск
Список
Период
Сортировка
От Basil Bourque
Тема Can a nested function determine it is being called within a trigger?
Дата
Msg-id D0A4B03B-9374-4F7E-A775-84C194BEE3FC@me.com
обсуждение исходный текст
Ответы Re: Can a nested function determine it is being called within a trigger?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
When a trigger calls a function, that function can determine if it is being called from within a trigger by testing for
avalue in the special variable "TG_OP". 

But what if a trigger calls a function that calls a 2nd function via the "PERFORM" command? Can that 2nd function tell
ifit is being run in a trigger? 

Trigger --> Function_A --> Function_B

--Basil Bourque



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

Предыдущее
От: Edison So
Дата:
Сообщение: Help: pg_restore failure
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Help: pg_restore failure