Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 2F108475AF0 for ; Thu, 27 Jun 2002 15:57:10 -0400 (EDT) Mailbox-Line: From jboes@nexcerpt.com Thu Jun 27 15:57:10 2002 Received: from news.hub.org (news.hub.org [64.49.215.80]) by postgresql.org (Postfix) with ESMTP id 70AC34770E3 for ; Thu, 27 Jun 2002 15:28:01 -0400 (EDT) Received: by news.hub.org (Postfix, from userid 8) id 0E254381CA8; Thu, 27 Jun 2002 15:27:34 -0400 (EDT) From: jboes@nexcerpt.com (Jeff Boes) X-Newsgroups: comp.databases.postgresql.sql Subject: to_char() and order-by Date: 27 Jun 2002 12:27:11 -0700 Organization: http://groups.google.com/ Lines: 37 Message-ID: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: groups-abuse@google.com To: pgsql-sql@postgresql.org X-Spam-Status: No, hits=-3.0 required=5.0 tests=ORDER_STATUS version=2.30 X-Spam-Level: X-Archive-Number: 200206/374 X-Sequence-Number: 8339 Perhaps this was covered in the 7.2.x release notes, but it's mystifying us: select to_char(time_link,'999.99') from stat_fetch where time_link is not null order by 1 desc limit 10; (time_link is a double-precision column.) Under 7.1.3, this returns results like: to_char --------- 9.99 9.99 9.99 9.99 9.99 9.99 9.99 9.99 9.99 9.99 (10 rows) while under 7.2.1, you get the top 10 rows in *numerical* order: to_char --------- 278.78 261.07 240.25 180.24 173.26 160.35 159.02 144.57 134.21 131.66 (10 rows)