Re: SQL feature requests - Mailing list pgsql-hackers

From Florian G. Pflug
Subject Re: SQL feature requests
Date
Msg-id 46CDF826.8020702@phlo.org
Whole thread Raw
In response to Re: SQL feature requests  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Responses Re: SQL feature requests
Re: SQL feature requests
Re: SQL feature requests
List pgsql-hackers
Kevin Grittner wrote:
>>>> On Thu, Aug 23, 2007 at  3:01 PM, in message <11856.1187899268@sss.pgh.pa.us>,
> Tom Lane <tgl@sss.pgh.pa.us> wrote: 
>> The only argument I've
>> heard that carries much weight with me is that it eases porting from
>> other DBMS's that allow this.  Are there any others besides Oracle?
>  
>> select * from (select f1 from t) 
>  
> In Sybase:
>  
> com.sybase.jdbc2.jdbc.SybSQLException: The derived table expression is missing a correlation name. Check derived
tablesyntax in the Reference Manual.
 
> Error code: 11753
> SQL state: ZZZZZ

The really funny thing is that pgsql, mysql and at least sybase
*explicitly* dissallow the no-alias case. Which shows that  .) This seems to be common source of confusion and errors.
.)Aliasless-Subqueries wouldn't lead to ambigous grammras in those databases.     Otherwise, you'd expect to get some
moregeneric syntax error, and not     the very explicit "No alias, but expected one".
 

I agree with Tom - knowing *why* the standard committee disallows that syntax -
and why everybody except oracle chose to agree with it would be quite interesting.

greetings, Florian Pflug



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: invalid data for encoding
Next
From: "Gabor Szabo"
Date:
Subject: Joining the PostgreSQL build farm