Re: RFE: Column aliases in WHERE clauses

From: Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Mike Christensen <mike(at)kitchenpc(dot)com>, "Daniel Serodio (lists)" <daniel(dot)lists(at)mandic(dot)com(dot)br>, Ryan Kelly <rpkelly22(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: RFE: Column aliases in WHERE clauses
Date: 2012-09-18 06:44:46
Message-ID: 5058185E.9050907@ringerc.id.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

--
Craig Ringer

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Albe Laurenz 2012-09-18 07:01:13 Re: State of the art for foreign keys to child tables?
Previous Message Craig Ringer 2012-09-18 06:35:03 Re: log_destination = csvlog, line breaks interfere in analysis