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