Re: ambiguous column names in subqueries

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: ambiguous column names in subqueries
Дата
Msg-id 4701.1100730185@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: ambiguous column names in subqueries  (Greg Stark <gsstark@mit.edu>)
Ответы Re: ambiguous column names in subqueries  (Greg Stark <gsstark@mit.edu>)
Список pgsql-hackers
Greg Stark <gsstark@mit.edu> writes:
> Tom Lane <tgl@sss.pgh.pa.us> writes:
>> select * from (select 1 as foo, 2 as foo) as x(foo1, foo2);

> I still have the maintenance problem of having to edit the outer query every
> time the list of columns from the inner query changes.

Yeah, but at least you only have to do it in one place.

AFAICS removing columns from the inner query because they have duplicate
names would violate the SQL spec, so it's not going to happen.
        regards, tom lane


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

Предыдущее
От: John Hansen
Дата:
Сообщение: Re: split_part bug
Следующее
От: Tom Lane
Дата:
Сообщение: Re: split_part bug