Re: Why lower's not accept an AS declaration ?

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Hervé Piedvache <herve(at)elma(dot)fr>
Cc: Darko Prenosil <darko(dot)prenosil(at)finteh(dot)hr>, Postgresql General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Why lower's not accept an AS declaration ?
Date: 2003-08-18 18:58:10
Message-ID: 20030818115349.R32578-100000@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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).

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2003-08-18 18:59:13 Re: Why lower's not accept an AS declaration ?
Previous Message Dev 2003-08-18 18:57:12 Default Value in Table Setup Help