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

From PFC
Subject Re: UPDATE TRIGGER on view WAS: Re: Relation in tables
Date
Msg-id opsma60jw9th1vuj@musicbox
Whole thread Raw
In response to UPDATE TRIGGER on view WAS: Re: Relation in tables  ("Keith Worthington" <keithw@narrowpathinc.com>)
Responses Re: UPDATE TRIGGER on view WAS: Re: Relation in tables
List pgsql-sql

> And all this time I thought that you couldn't write to a view.
You can't.But you can make it seem so you can.
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.
Search for "postgresql materialized views" for some examples.


pgsql-sql by date:

Previous
From: Geoffrey
Date:
Subject: Re: Order of columns in a table important in a stored procedure?
Next
From: PFC
Date:
Subject: Re: Order of columns in a table important in a stored procedure?