Re: Why lower's not accept an AS declaration ? - Mailing list pgsql-general

From Tom Lane
Subject Re: Why lower's not accept an AS declaration ?
Date
Msg-id 118.1061234592@sss.pgh.pa.us
Whole thread Raw
In response to Re: Why lower's not accept an AS declaration ?  (Hervé Piedvache <herve@elma.fr>)
Responses Re: Why lower's not accept an AS declaration ?
List pgsql-general
=?iso-8859-15?q?Herv=E9=20Piedvache?= <herve@elma.fr> writes:
> Is it an example more realistic for you to make an order by lower of
> something as an alias ?

Aliases attached to SELECT output columns are visible outside the
SELECT, not inside it.  The special case for ORDER BY simple-column-name
is a kluge for compatibility with a now-obsolete version of the SQL spec
(SQL92 expects this to work, SQL99 doesn't) and we aren't going to
extend it.  See past discussions in the archives (I seem to recall
answering this same question within the past week...)

            regards, tom lane

pgsql-general by date:

Previous
From: "scott.marlowe"
Date:
Subject: Re: Manage PostgreSQL Connections
Next
From: Bruno Wolff III
Date:
Subject: Re: newbie and no idea