Re: Do FROM items of different schemas conflict?

From: Joe Conway <mail(at)joeconway(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Do FROM items of different schemas conflict?
Date: 2002-03-08 23:26:01
Message-ID: 3C894889.200@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-03-08 23:28:32 Re: Do FROM items of different schemas conflict?
Previous Message Debian User 2002-03-08 23:13:42 Make my question clear.