table name firing trigger

From: Raphael Bauduin <raphael(dot)bauduin(at)be(dot)easynet(dot)net>
To: pgsql-novice(at)postgresql(dot)org
Subject: table name firing trigger
Date: 2004-08-11 07:44:42
Message-ID: 4119CE6A.3030206@be.easynet.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message MP TORRE 2004-08-11 08:38:59 which version ?
Previous Message Jake Stride 2004-08-11 07:06:35 Re: DISTINCT ordering