table name firing trigger - Mailing list pgsql-novice

From Raphael Bauduin
Subject table name firing trigger
Date
Msg-id 4119CE6A.3030206@be.easynet.net
Whole thread Raw
Responses Re: table name firing trigger
Re: table name firing trigger
List 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 by date:

Previous
From: Jake Stride
Date:
Subject: Re: DISTINCT ordering
Next
From: MP TORRE
Date:
Subject: which version ?