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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-bugs by date

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