Re: ambiguous column names in subqueries - Mailing list pgsql-hackers

From Greg Stark
Subject Re: ambiguous column names in subqueries
Date
Msg-id 87u0ro3z71.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: ambiguous column names in subqueries  (Oliver Jowett <oliver@opencloud.com>)
List pgsql-hackers
Oliver Jowett <oliver@opencloud.com> writes:

> 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.

The API with the problem is the SQL language. It's there that the columns
become inaccessible. It seems silly for the language to let you create
variables that you can't reference. 

Yes it's true that you could access them from the result set but that's even
worse. You have variables that you can't access from within the language but
that can escape to the outside world to cause real effects.

-- 
greg



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: split_part bug
Next
From: Greg Stark
Date:
Subject: Re: ambiguous column names in subqueries