RE: [SQL] Why *no* ambig.uous complain in select part? - Mailing list pgsql-sql

From Edward W. Rouse
Subject RE: [SQL] Why *no* ambig.uous complain in select part?
Date
Msg-id 018501c90497$d6c7f050$8457d0f0$@com
Whole thread Raw
In response to Why *no* ambig·uous complain in select part?  (Emi Lu <emilu@encs.concordia.ca>)
Responses Re: RE: [SQL] Why *no* ambig.uous complain in select part?
List pgsql-sql
Just a guess, but it seems to me that since the join is using col1 and col2
there is no ambiguity. They should be the same no matter which table it
comes from.

Edward W. Rouse


-----Original Message-----
From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org]
On Behalf Of Emi Lu
Sent: Friday, August 22, 2008 4:12 PM
To: pgsql-sql@postgresql.org
Subject: [SQL] Why *no* ambig.uous complain in select part?

Good morning,

Just notice one small thing, and need your information about select

select col1, col2
from table1
left join table2
using (col1, col2)

;

This query never complain about ambiguous columns of col1 and col2 in
the select part.

My guess is:
(1) col1, col2 always return table1.col1, table1.col2
(2) because using (col1, col2)
     that's why, table name is not necessary in select part

Am I wrong? Please advise?

Thank you!




--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql



pgsql-sql by date:

Previous
From: Emi Lu
Date:
Subject: Why *no* ambig·uous complain in select part?
Next
From: Emi Lu
Date:
Subject: Re: RE: [SQL] Why *no* ambig.uous complain in select part?