Re: UPDATE TRIGGER on view WAS: Re: Relation in tables - Mailing list pgsql-sql

From Tom Lane
Subject Re: UPDATE TRIGGER on view WAS: Re: Relation in tables
Date
Msg-id 28633.1108589994@sss.pgh.pa.us
Whole thread Raw
In response to Re: UPDATE TRIGGER on view WAS: Re: Relation in tables  (PFC <lists@boutiquenumerique.com>)
List pgsql-sql
PFC <lists@boutiquenumerique.com> writes:
> You can create an ON UPDATE/INSERT trigger on a view which intercepts the  
> UPDATE/INSERT to the view (which would otherwise fail) and do whatever you  
> want with it, including doing the operation on the real table.

This might work for INSERT but I really doubt it'll work for UPDATE or
DELETE.

You may be able to make it work with rules, though there are lots of
pitfalls in that approach.
        regards, tom lane


pgsql-sql by date:

Previous
From: PFC
Date:
Subject: Re: Order of columns in a table important in a stored procedure?
Next
From: Andreas Joseph Krogh
Date:
Subject: Re: Making NULL entries appear first when ORDER BY ASC