Re: create or replace rule/view (fwd) - Mailing list pgsql-patches

From Rod Taylor
Subject Re: create or replace rule/view (fwd)
Date
Msg-id 1030567698.83275.144.camel@jester
Whole thread Raw
In response to Re: create or replace rule/view (fwd)  (Neil Conway <neilc@samurai.com>)
List pgsql-patches
On Wed, 2002-08-28 at 15:47, Neil Conway wrote:
> Rod Taylor <rbt@zort.ca> writes:
> > REPLACE VIEW shouldn't change the visible structure at all.  It defeats
> > the purpose.
>
> So what changes to the view should be allowed? Adding new attributes,
> but not removing any or changing the properties of an attribute?
> (e.g. data type).

Same as with a table. I'm not even sure about adding attributes should
be allowed.  Consider another view that was a select * of the first.
Since we have no way to find the original view query, we don't know
whether it was select * or each individual column to cascade the add.

Your logic looked good


Perhaps a good chunk of the ALTER TABLE commands could be ported to
views as well (drop column, etc.) to allow restrict / cascade to be
appropriately specified.


pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: CREATE INDEX error message
Next
From: Peter Eisentraut
Date:
Subject: Re: make life easier for translators