Re: Update through views?

From: dev(at)archonet(dot)com
To: Roderick "A(dot) Anderson" <raanders(at)tincan(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Update through views?
Date: 2001-03-07 21:37:08
Message-ID: 20010307.21370800@client.archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 3/7/01, 7:32:26 PM, Roderick "A." Anderson <raanders(at)tincan(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-03-07 22:21:12 Re: unbalanced indexes -> fixed via dump/restore?
Previous Message Richard Huxton 2001-03-07 21:15:50 Escaping an underscore in LIKE