Re: ambiguous column names in subqueries

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: ambiguous column names in subqueries
Date: 2004-11-17 21:41:09
Message-ID: 4226.1100727669@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2004-11-17 21:48:20 Re: Tired of -Wold-style-definition already
Previous Message John Hansen 2004-11-17 21:40:50 split_part bug