Re: UPDATE TRIGGER on view WAS: Re: Relation in tables

From: PFC <lists(at)boutiquenumerique(dot)com>
To: KeithW(at)narrowpathinc(dot)com, pgsql-sql(at)postgresql(dot)org
Subject: Re: UPDATE TRIGGER on view WAS: Re: Relation in tables
Date: 2005-02-16 21:22:57
Message-ID: opsma60jw9th1vuj@musicbox
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message PFC 2005-02-16 21:27:03 Re: Order of columns in a table important in a stored procedure?
Previous Message Pavel Rabel 2005-02-16 20:53:07 Re: Trigger