Re: COALESCE in ORDER BY... - Mailing list pgsql-sql

From Stephan Szabo
Subject Re: COALESCE in ORDER BY...
Date
Msg-id 20030517103937.K99993-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Re: COALESCE in ORDER BY...  (Andreas Schmitz <andreas.schmitz@as-dataservice.de>)
List pgsql-sql
On Sat, 17 May 2003, Andreas Schmitz wrote:

> Terry Yapt wrote:
>
> >www=> SELECT 10 AS first ORDER BY COALESCE(first,0) DESC;
> >ERROR:  Attribute "first" not found
> >
> >Thanks in advance..
> >
> >
> Perhaps, this is a bug, but I have a workarround for you till this is
> clariefied:

Just an unimplemented enhancement I think.  At least in SQL92, order
by expressions need to be column references (possibly with collation
conversions), we allow some functional order by expressions, but not one's
referencing select aliases I think.



pgsql-sql by date:

Previous
From: Andreas Schmitz
Date:
Subject: Re: COALESCE in ORDER BY...
Next
From: Jan Wieck
Date:
Subject: Re: Can arrays reference primary keys in CREATE TABLE?