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

From Tom Lane
Subject Re: ambiguous column names in subqueries
Date
Msg-id 4701.1100730185@sss.pgh.pa.us
Whole thread Raw
In response to Re: ambiguous column names in subqueries  (Greg Stark <gsstark@mit.edu>)
Responses Re: ambiguous column names in subqueries  (Greg Stark <gsstark@mit.edu>)
List 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 by date:

Previous
From: John Hansen
Date:
Subject: Re: split_part bug
Next
From: Tom Lane
Date:
Subject: Re: split_part bug