Re: Bug with ORDER BY expression [ ASC | DESC ] ? - Mailing list pgsql-sql

From Tom Lane
Subject Re: Bug with ORDER BY expression [ ASC | DESC ] ?
Date
Msg-id 23760.1022075809@sss.pgh.pa.us
Whole thread Raw
In response to Bug with ORDER BY expression [ ASC | DESC ] ?  (Christoph Haller <ch@rodos.fzk.de>)
Responses Re: Bug with ORDER BY expression [ ASC | DESC ] ?  (Christoph Haller <ch@rodos.fzk.de>)
List pgsql-sql
Christoph Haller <ch@rodos.fzk.de> writes:
> 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. 

Perhaps you meant to say

order by o.sid desc, o.timepoint desc, o.lid desc, o.mid desc, o.entrancetime desc;
        regards, tom lane


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: Compatibility Issue of CREATE RULE in 7.2
Next
From: Christoph Haller
Date:
Subject: Re: Bug with ORDER BY expression [ ASC | DESC ] ?