Bug with ORDER BY expression [ ASC | DESC ] ?

From: Christoph Haller <ch(at)rodos(dot)fzk(dot)de>
To: pgsql-sql(at)postgresql(dot)org
Subject: Bug with ORDER BY expression [ ASC | DESC ] ?
Date: 2002-05-22 15:17:01
Message-ID: 200205221317.PAA26760@rodos
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi,
I am doing the following select in PostgreSQL 7.2.1

select distinct on (o.sid,o.timepoint,o.lid,o.mid) o.sid,o.timepoint,o.lid,o.mid,o.value
from onfvalue o, tempreftime t
where o.sid=t.sid and o.timepoint=t.timepoint and o.lid=t.lid and o.mid=t.mid
order by o.sid,o.timepoint,o.lid,o.mid,o.entrancetime desc;

but the result is coming in ascending order.
There is no difference to

select distinct on (o.sid,o.timepoint,o.lid,o.mid) o.sid,o.timepoint,o.lid,o.mid,o.value
from onfvalue o, tempreftime t
where o.sid=t.sid and o.timepoint=t.timepoint and o.lid=t.lid and o.mid=t.mid
order by o.sid,o.timepoint,o.lid,o.mid,o.entrancetime asc;

Is this a bug or am I missing something?
Regards, Christoph

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Christoph Haller 2002-05-22 16:01:01 Re: Bug with ORDER BY expression [ ASC | DESC ] ?
Previous Message Oliver Elphick 2002-05-22 14:45:39 Re: [SQL] Bug with Daylight Savings Time & Interval