Re: ambiguous column names in subqueries

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: ambiguous column names in subqueries
Дата
Msg-id 419BC756.3020200@opencloud.com
обсуждение исходный текст
Ответ на 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 wrote:

> What purpose is there to returning both columns to the outer query? The
> columns become effectively inaccessible. There's no syntax for disambiguating
> any reference.
> 
> I think postgres should treat the second alias as hiding the first. Currently
> there's no way to selectively override a single output column. The only way to
> do is to put your query in a subquery and list every single output column
> again except the one you want to override.
> 
> Note that I'm not saying Postgres should remove ambiguous columns from
> different tables for the inner query. Only for subsequent layers where they
> have no way to access them anyways.

Please don't. JDBC (for example) has no problem with ambiguous columns, 
you just access them by index, and you have resultset metadata available 
if you want to implement your own rules for finding those indexes. It 
sounds like your problem really lies in the API you are using to access 
the results.

-O


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

Предыдущее
От: John Hansen
Дата:
Сообщение: split_part bug
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Tired of -Wold-style-definition already