Re: RFE: Column aliases in WHERE clauses - Mailing list pgsql-general

From Chris Angelico
Subject Re: RFE: Column aliases in WHERE clauses
Date
Msg-id CAPTjJmpSTJx90DgmG+GMO6N7q0dGCJsJiDSCMJvTshv024A+GA@mail.gmail.com
Whole thread Raw
In response to Re: RFE: Column aliases in WHERE clauses  (Craig Ringer <ringerc@ringerc.id.au>)
List pgsql-general
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


pgsql-general by date:

Previous
From: António Rodrigues
Date:
Subject: Re: Move table - New schema
Next
From: Eden Cardim
Date:
Subject: Column aliases in WHERE clauses