Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 9358047642B for ; Wed, 22 May 2002 09:33:22 -0400 (EDT) Received: from fzkmail2.fzk.de (fzkmail2.fzk.de [141.52.27.52]) by postgresql.org (Postfix) with SMTP id BC0B6476041 for ; Wed, 22 May 2002 09:16:59 -0400 (EDT) Received: FROM resy5.fzk.de BY fzkmail2.fzk.de ; Wed May 22 15:17:02 2002 +0200 Received: œby rodos.fzk.de with ESMTP (8.8.6 (PHNE_17135)/8.7.1) id PAA26967 for ; Wed, 22 May 2002 15:17:01 +0200 (METDST) From: Christoph Haller Message-Id: <200205221317.PAA26760@rodos> Subject: Bug with ORDER BY expression [ ASC | DESC ] ? To: pgsql-sql@postgresql.org Date: Wed, 22 May 2002 15:17:01 METDST X-Mailer: Elm [revision: 212.4] X-Archive-Number: 200205/236 X-Sequence-Number: 7871 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