From: | Greg Stark <gsstark(at)mit(dot)edu> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>, 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 04:15:30 |
Message-ID: | 87wtbkcqzh.fsf@stark.xeocode.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> 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).
Well you could always create a "dual", it was always just a regular table. We
used to joke about what would happen to Oracle if you inserted an extra row in
it...
Oracle used to always require FROM, if it has stopped requiring it then that's
new. I had heard it had special-cased dual in later versions to avoid the
table access overhead, I suspect these two changes are related.
--
greg
From | Date | Subject | |
---|---|---|---|
Next Message | Antoine | 2006-06-14 06:36:22 | Re: OT - select + must have from - sql standard syntax? |
Previous Message | Jim C. Nasby | 2006-06-14 03:35:39 | Re: Solaris shared_buffers anomaly? |