Re: postgres question: Views with duplicate field names

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: postgres question: Views with duplicate field names
Дата
Msg-id 25224.1473110758@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: postgres question: Views with duplicate field names  (Ryan Murphy <ryanfmurphy@gmail.com>)
Ответы Re: postgres question: Views with duplicate field names  (Ryan Murphy <ryanfmurphy@gmail.com>)
Re: postgres question: Views with duplicate field names  (Ryan Murphy <ryanfmurphy@gmail.com>)
Список pgsql-general
Ryan Murphy <ryanfmurphy@gmail.com> writes:
> Interesting, thanks!  Do you know why the first one fails instead of doing
> that renaming process, while your version succeeds?

You're confused about the input vs. the output.  The output columns
of a view all have to have distinct names, just like you can't do
"create table foo (f1 int, f1 int)".  They can be reading the same
values, though.

            regards, tom lane


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

Предыдущее
От: Patrick B
Дата:
Сообщение: Re: Get date timestamp(3) without time zone column - PGSQL 9.5
Следующее
От: Ryan Murphy
Дата:
Сообщение: Re: postgres question: Views with duplicate field names