Syntax question: use of join/using with fully qualified table name - Mailing list pgsql-sql

From Bryce Nesbitt
Subject Syntax question: use of join/using with fully qualified table name
Date
Msg-id 479D2694.3090202@obviously.com
Whole thread Raw
Responses Re: Syntax question: use of join/using with fully qualified table name
Re: Syntax question: use of join/using with fully qualified table name
List pgsql-sql
I've got a join where a certain column name appears twice:

select username,last_name from eg_member join eg_membership using
(member_id) join eg_account using (account_id) join eg_person using
(person_id);
ERROR:  common column name "person_id" appears more than once in left table


My first inclination was to fully quality the table name.  Why would
this not be acceptable syntax?

select username,last_name from eg_member join eg_membership using
(member_id) join eg_account using (account_id) join eg_person using
(eg_member.person_id);
ERROR:  syntax error at or near "." at character 145


Of course I eventually wrote it:

select username,last_name from eg_member join eg_membership using (member_id) join eg_account using (account_id) join
eg_personon eg_member.person_id=eg_person.person_id';
 



PostgreSQL 8.1.9 on i686-redhat-linux-gnu, compiled by GCC gcc (GCC) 4.1.1 20070105 (Red Hat 4.1.1-51)


-- 
----
Visit http://www.obviously.com/



pgsql-sql by date:

Previous
From: "Andrej Ricnik-Bay"
Date:
Subject: Re: Extract interdependent info from one table
Next
From: Martin Marques
Date:
Subject: Re: Syntax question: use of join/using with fully qualified table name