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

From Tom Lane
Subject Re: create or replace rule/view (fwd)
Date
Msg-id 24931.1030580899@sss.pgh.pa.us
Whole thread Raw
In response to Re: create or replace rule/view (fwd)  (Neil Conway <neilc@samurai.com>)
Responses Re: create or replace rule/view (fwd)
List pgsql-patches
Neil Conway <neilc@samurai.com> writes:
> 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?

You can redefine the query that supports the view.  You cannot add,
remove, rename, or change the datatypes of any columns of the view.

It occurs to me that we have similar problems if one does ALTER TABLE on
a table or composite type that is being used as a function argument or
result type.  Possibly we could check for this by looking to see if
there are any dependencies recorded against the table's pg_type row.

            regards, tom lane

pgsql-patches by date:

Previous
From: "Matthew T. O'Connor"
Date:
Subject: Re: [HACKERS] fix for palloc() of user-supplied length
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] fix for palloc() of user-supplied length