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

From Stephan Szabo
Subject Re: Why lower's not accept an AS declaration ?
Date
Msg-id 20030818115349.R32578-100000@megazone.bigpanda.com
Whole thread Raw
In response to Re: Why lower's not accept an AS declaration ?  (Hervé Piedvache <herve@elma.fr>)
List pgsql-general
On Mon, 18 Aug 2003, [iso-8859-15] Herv� Piedvache wrote:

> Mistake ? Why a mistake ... it's as you said an alias ... for result ... I
> know that ... but why order by my alias is running ... and NOT an order by
> with a LOWER() function call is not running ... that's mean LOWER() do not
> accept alias ... but ORDER accept ... so sorry for me it's not so logical !

SQL92 doesn't allow expressions in order by, but you can name output
columns of the select list.  We extend the specification in a way similar
to SQL99 to allow expressions on the input columns of the select list.  We
do not extend it to expressions upon the output columns of the select list
(although re-reading SQL99 makes me believe that it would allow such).


pgsql-general by date:

Previous
From: Dennis Gearon
Date:
Subject: Re: Simulating sequences
Next
From: Dev
Date:
Subject: Default Value in Table Setup Help