On Tue, Sep 18, 2012 at 4:44 PM, Craig Ringer <ringerc@ringerc.id.au> wrote:
> On 09/18/2012 07:32 AM, Tom Lane wrote:
>>
>> It's easier to understand why this is if you realize that SQL has a very
>> clear model of a "pipeline" of query execution.
>
> I just wish they hadn't written it backwards!
>
> It'd be much less confusing were it formulated as something like:
>
> SELECT
> FROM thetable
> WHERE first_letter > 'a'
> RESULTS left(value,1) AS first_letter
>
> or something, where the order is more obvious. I really dislike the way SQL
> is written not-quite-backwards.
I agree, SQL has its quirks. There are general principles, but they're
all violated somewhere... "UNION ALL" annoys me some by breaking the
rule that more words = more work, which is almost universally adhered
to elsewhere. But such is the nature of specifications.
ChrisA