Re: UPDATE Trigger on multiple tables

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: fmiddleton(at)verizon(dot)net
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: UPDATE Trigger on multiple tables
Date: 2005-10-13 04:39:10
Message-ID: 17673.1129178350@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Ferindo Middleton Jr <fmiddleton(at)verizon(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Anthony Molinaro 2005-10-13 05:28:25 Re: pg, mysql comparison with "group by" clause
Previous Message Ferindo Middleton Jr 2005-10-13 04:29:10 UPDATE Trigger on multiple tables