Skip site navigation (1) Skip section navigation (2)

Re: create or replace rule/view (fwd)

From: Rod Taylor <rbt(at)zort(dot)ca>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>,Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>,PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: create or replace rule/view (fwd)
Date: 2002-08-28 20:48:17
Message-ID: 1030567698.83275.144.camel@jester (view raw or flat)
Thread:
Lists: pgsql-patches
On Wed, 2002-08-28 at 15:47, Neil Conway wrote:
> Rod Taylor <rbt(at)zort(dot)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.


In response to

pgsql-patches by date

Next:From: Peter EisentrautDate: 2002-08-28 21:02:47
Subject: Re: make life easier for translators
Previous:From: Bruce MomjianDate: 2002-08-28 20:46:47
Subject: Re: CREATE INDEX error message

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group