Re: patch: Add columns via CREATE OR REPLACE VIEW

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: patch: Add columns via CREATE OR REPLACE VIEW
Дата
Msg-id 603c8f070808071538y1934877aq23b3a4b2d42d21c0@mail.gmail.com
обсуждение исходный текст
Ответ на Re: patch: Add columns via CREATE OR REPLACE VIEW  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: patch: Add columns via CREATE OR REPLACE VIEW  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Forgot to copy my response to this to the list.

On Thu, Aug 7, 2008 at 5:26 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "Robert Haas" <robertmhaas@gmail.com> writes:
>> Although several people have said that they prefer the idea of using
>> ALTER VIEW to make changes to views, no one has really expanded on the
>> reasons for their preference.
>
> Because it sidesteps the problem of tracking which column is supposed to
> be which.  If you try to do it through CREATE OR REPLACE VIEW, you have
> to either be extremely restrictive (like probably not allow renaming
> of columns at all), or write some AI-complete algorithm to guess at what
> the user intended.

The current code takes the approach of being extremely restrictive -
it doesn't let you change anything at all.  The code I'm proposing
manages to relax that restriction without creating any ambiguity that
anyone has been able to point out.  All of the ambiguities that have
been mentioned are problems that might be created by some other,
entirely hypothetical patch.

...Robert


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Merlin Moncure"
Дата:
Сообщение: bug in prepared statements, alter table <8.3
Следующее
От: Andrew Gierth
Дата:
Сообщение: Re: bug in prepared statements, alter table <8.3