From: Ferindo Middleton Jr <fmiddleton@verizon.net>
To: pgsql-sql@postgresql.org
Subject: UPDATE Trigger on multiple tables
Date: Thu, 13 Oct 2005 00:29:10 -0400
Message-ID: <434DE296.8060203@verizon.net> (raw)
Is it possible to have a single trigger on multiple tables
simultaneously? Example:
CREATE TRIGGER emp_cust_stamp BEFORE INSERT OR UPDATE ON employees, customers
FOR EACH ROW EXECUTE PROCEDURE last_updated_stamp();
I tried something like the above but get an error message at the comma. I tried using the keyword AND as well.
I couldn't find anything on this in the docs. I have many different tables in my databases which all have a
"last_updated" field and it seems less tedious to be able to enforce updating this trigger database-wide using
just one trigger. Is it possible?
Ferindo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: fmiddleton@verizon.net
Subject: Re: UPDATE Trigger on multiple tables
In-Reply-To: <434DE296.8060203@verizon.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox