X-Original-To: pgsql-sql@postgresql.org Received: from localhost (unknown [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id 69685924C6B for ; Sat, 17 May 2003 13:41:16 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193:10024]) (amavisd-new) with ESMTP id 62042-10 for ; Sat, 17 May 2003 13:41:11 -0400 (EDT) Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by developer.postgresql.org (Postfix) with ESMTP id 262EB924C6A for ; Sat, 17 May 2003 13:41:11 -0400 (EDT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 2950CD60E; Sat, 17 May 2003 10:41:10 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 1D0635C0A; Sat, 17 May 2003 10:41:10 -0700 (PDT) Date: Sat, 17 May 2003 10:41:10 -0700 (PDT) From: Stephan Szabo To: Andreas Schmitz Cc: Terry Yapt , Subject: Re: COALESCE in ORDER BY... In-Reply-To: <3EC66DE1.1090705@as-dataservice.de> Message-ID: <20030517103937.K99993-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/363 X-Sequence-Number: 13528 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.