Re: patch: Add columns via CREATE OR REPLACE VIEW - Mailing list pgsql-hackers

From Tom Lane
Subject Re: patch: Add columns via CREATE OR REPLACE VIEW
Date
Msg-id 22019.1218132797@sss.pgh.pa.us
Whole thread Raw
In response to Re: patch: Add columns via CREATE OR REPLACE VIEW  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: patch: Add columns via CREATE OR REPLACE VIEW  ("Robert Haas" <robertmhaas@gmail.com>)
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Andrew Dunstan escribi�:
>> Tom Lane wrote:
>>> Maybe the right way is to *not* use CREATE OR REPLACE VIEW, but
>>> rather ALTER VIEW ADD COLUMN and so on.  Then column identity seems
>>> a lot easier to keep track of.
>> 
>> How would that look? Where would we put the new query?

> I was thinking that the ADD COLUMN should specify the new result list
> entry.

Yeah, that's what I was thinking too.  If you needed to change more
than just the topmost SELECT list, you'd need two steps: an ADD COLUMN
and then CREATE OR REPLACE VIEW to change the query in some way that
doesn't result in changing the output column set.  Maybe that's going
to be too awkward to use though.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: patch: Add columns via CREATE OR REPLACE VIEW
Next
From: "Robert Haas"
Date:
Subject: Re: patch: Add columns via CREATE OR REPLACE VIEW