Re: UPDATE Trigger on multiple tables - Mailing list pgsql-sql

From Tom Lane
Subject Re: UPDATE Trigger on multiple tables
Date
Msg-id 17673.1129178350@sss.pgh.pa.us
Whole thread Raw
In response to UPDATE Trigger on multiple tables  (Ferindo Middleton Jr <fmiddleton@verizon.net>)
List pgsql-sql
Ferindo Middleton Jr <fmiddleton@verizon.net> writes:
> 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();

No.  You can use the same function for multiple triggers, but you have
to CREATE TRIGGER for each table separately.
        regards, tom lane


pgsql-sql by date:

Previous
From: Ferindo Middleton Jr
Date:
Subject: UPDATE Trigger on multiple tables
Next
From: "Anthony Molinaro"
Date:
Subject: Re: pg, mysql comparison with "group by" clause