From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com> |
Cc: | Antoine <melser(dot)anton(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: OT - select + must have from - sql standard syntax? |
Date: | 2006-06-14 02:44:29 |
Message-ID: | 19096.1150253069@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
"Jim C. Nasby" <jnasby(at)pervasive(dot)com> writes:
> On Tue, Jun 13, 2006 at 02:43:45PM +0200, Antoine wrote:
>> I don't have a copy of the standard on hand and a collegue is claiming
>> that there must be a from clause in a select query (he is an oracle
>> guy). This doesn't seem to be the case for postgres... does anyone
>> know?
> Dunno, but I know that other databases (at least DB2) don't require FROM
> either.
The spec does require a FROM clause in SELECT (at least as of SQL99, did
not check SQL2003). However, it's clearly mighty useful to allow FROM
to be omitted for simple compute-this-scalar-result problems. You
should respond to the Oracle guy that "SELECT whatever FROM dual" is not
in the standard either (certainly the spec does not mention any such
table). And in any case an Oracle fanboy has got *no* leg to stand on
when griping about proprietary extensions to the spec.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Jim C. Nasby | 2006-06-14 03:35:39 | Re: Solaris shared_buffers anomaly? |
Previous Message | Tom Lane | 2006-06-14 02:24:41 | Re: scaling up postgres |