Re: Update through views? - Mailing list pgsql-general

From dev@archonet.com
Subject Re: Update through views?
Date
Msg-id 20010307.21370800@client.archonet.com
Whole thread Raw
In response to Update through views?  ("Roderick A. Anderson" <raanders@tincan.org>)
Responses Re: Update through views?
List pgsql-general
On 3/7/01, 7:32:26 PM, Roderick "A." Anderson <raanders@tincan.org> wrote
regarding [GENERAL] Update through views?:

> I was reading in Bruce's book this morning about rules etc.  He gave an
> example of how to update the underlying tables of a view using rules.  My
> question ('cause the memory isn't what it used to be) is;  Will 7.1 allow
> inserts, updates, and deletes through views?  I remember something about
> UNIONs and friends working but not these other thingys.

Nope - and I'm not sure how Postgres is ever going to figure out how to
update/insert on a view in the general case. The view might use UNION,
GROUP BY and CASE and effectively be read-only.

That being said, for a simple view building your own rules is simple
enough. If you're not subscribed to pgsql-sql check the mailing archives
for some recent discussion on things to be careful of (involving me, Jens
Hartwig and Tom Lane trying above and beyond the call of duty to explain
things to us)

- Richard Huxton

pgsql-general by date:

Previous
From: "Creager, Robert S"
Date:
Subject: RE: SELECT performance drop v 6.5 -> 7.0.3
Next
From: Tom Lane
Date:
Subject: Re: unbalanced indexes -> fixed via dump/restore?