Skip site navigation (1) Skip section navigation (2)

strange order by behavior

From: Jeffrey Melloy <jmelloy(at)visualdistortion(dot)org>
To: pgsql-bugs(at)postgresql(dot)org
Subject: strange order by behavior
Date: 2004-11-16 06:57:10
Message-ID: 4199A4C6.8060305@visualdistortion.org (view raw or flat)
Thread:
Lists: pgsql-bugs
I've run across a bug with order by:

select 1 as a order by a;
 -- works

select 1 as a, 2 as b order by a;
 -- works

select 1 as a, 2 as b order by a + b;
ERROR: column "a" does not exist

select * from (select 1 as a, 2 as b) stuff order by a + b;
 -- works

Responses

pgsql-bugs by date

Next:From: Mindaugas KvedaravičiusDate: 2004-11-16 07:52:42
Subject: I found some kind of bug
Previous:From: Klint GoreDate: 2004-11-16 05:47:20
Subject: Re: Problem installing postgresql in XP with cygwin

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group