table name firing trigger

Поиск
Список
Период
Сортировка
От Raphael Bauduin
Тема table name firing trigger
Дата
Msg-id 4119CE6A.3030206@be.easynet.net
обсуждение исходный текст
Ответы Re: table name firing trigger  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: table name firing trigger  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-novice
Hi,

Does a function executed by a trigger know which table fired the trigger?
I'm using the same function for several triggers on different tables.
Now, I'm passing the table name as argument:
CREATE TRIGGER "customers_update_log_t" after UPDATE on "customers" for each row execute procedure
"customers_update_log"('customers');

I wondered if in the function code, we have access to the table name that fired the trigger.
Also, does the function have access to the type of action that fired the trigger?
Eg, if I create a trigger after update and insert, is it possible to know if it's an insert or an update that fired the
trigger?

thanks.

Raph

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

Предыдущее
От: Jake Stride
Дата:
Сообщение: Re: DISTINCT ordering
Следующее
От: MP TORRE
Дата:
Сообщение: which version ?