Greg Stark <gsstark(at)mit(dot)edu> writes:> Is there any help in the SQL spec on this?
Rename the columns at the output of the subselect, eg
select * from (select 1 as foo, 2 as foo) as x(foo1, foo2);
regards, tom lane