Re: ALTER TABLE should change respective views - Mailing list pgsql-hackers

From Tom Lane
Subject Re: ALTER TABLE should change respective views
Date
Msg-id 15445.1241532608@sss.pgh.pa.us
Whole thread Raw
In response to Re: ALTER TABLE should change respective views  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> And this could then also change the return type of foo(), thus changing the 
> row type of the view and would thus propogate up to other views.  And so if 
> you have "many views", as you say, this could become a great mess.  You could
> probably define and implement a solution, but it would be very confusing and 
> risky to use.

The SQL committee has also historically chosen to punt on such things.
Note the long-established rule that "*" is expanded at view definition
time (so adding columns doesn't change views).  I also see a flat
prohibition on *any* view reference in the newly added SET DATA TYPE
command (SQL:2008 11.17 <alter column data type clause>):

7) C shall not be referenced in the <query expression> of any view descriptor. 
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: bytea vs. pg_dump
Next
From: Dimitri Fontaine
Date:
Subject: Re: bytea vs. pg_dump