Re: patch: Add columns via CREATE OR REPLACE VIEW

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: patch: Add columns via CREATE OR REPLACE VIEW
Дата
Msg-id 22019.1218132797@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: patch: Add columns via CREATE OR REPLACE VIEW  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: patch: Add columns via CREATE OR REPLACE VIEW  ("Robert Haas" <robertmhaas@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: patch: Add columns via CREATE OR REPLACE VIEW
Следующее
От: "Robert Haas"
Дата:
Сообщение: Re: patch: Add columns via CREATE OR REPLACE VIEW