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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-patches by date

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