Re: Do FROM items of different schemas conflict? - Mailing list pgsql-hackers

From Joe Conway
Subject Re: Do FROM items of different schemas conflict?
Date
Msg-id 3C894889.200@joeconway.com
Whole thread Raw
In response to Do FROM items of different schemas conflict?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Do FROM items of different schemas conflict?
List pgsql-hackers
Tom Lane wrote:
> Okay folks, time to put on your language-lawyer hats ...
> 
>     SELECT * FROM schema1.tab1, schema2.tab1;
> 
> Is this allowed?  SQL92 appears to allow it: section 6.3 <table
> reference> says:

FWIW:
This works in Oracle 8.1.6

Connected to Oracle8i Enterprise Edition Release 8.1.6.3.0
Connected as cyapps

SQL> select * from apps.plan_table, cyapps.plan_table;
 <snip>

24 rows selected



> This restriction also suggests strongly that the spec authors intended
> to allow unqualified references to qualified FROM-items, viz:
> 
>     SELECT tab1.col1 FROM schema1.tab1;
> 

...so does this...
SQL> select plan_table.operation from apps.plan_table;
 <snip>

12 rows selected


> Comments?  Is anyone familiar with the details of how other DBMSes
> handle these issues?

MSSQL 7 seems to handle the first syntax also, but not the second.

Joe



pgsql-hackers by date:

Previous
From: Fernando Nasser
Date:
Subject: Re: Do FROM items of different schemas conflict?
Next
From: Tom Lane
Date:
Subject: Re: Do FROM items of different schemas conflict?