Re: ambiguous column names in subqueries

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: ambiguous column names in subqueries
Дата
Msg-id 87is834uur.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Re: ambiguous column names in subqueries  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> writes:

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

That's really what I was asking I guess. Does the spec require the current
behaviour.

An alternative would be some way to explicitly remove columns from a result
set.

Something like

SELECT a+1 AS a, b+1 AS b, * EXCEPT (a,b) FROM (SELECT 1 AS a, 2 as b, 3 as c)

-- 
greg



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

Предыдущее
От: Neil Conway
Дата:
Сообщение: Re: Tired of -Wold-style-definition already
Следующее
От: Vsevolod Lobko
Дата:
Сообщение: Re: are there any cons to linking libstdc++ with