Received: from news.tht.net (news.hub.org [216.126.91.242]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f7AN2aP19996; Fri, 10 Aug 2001 19:02:36 -0400 (EDT) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.4/8.11.4) id f7AMp1r64673; Fri, 10 Aug 2001 18:51:01 -0400 (EDT) (envelope-from news) From: Allan Engelhardt X-Newsgroups: comp.databases.postgresql.general,comp.databases.postgresql.sql Subject: How to change default time display format (and buglet?)? Date: Fri, 10 Aug 2001 23:52:10 +0100 Organization: http://cybaea.com/ Message-ID: <3B74659A.DF58CBC6@cybaea.com> X-NNTP-Posting-Host: engelhardt.demon.co.uk:193.237.12.86 X-Complaints-To: abuse@demon.net X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.7 i686) X-Accept-Language: en MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 27 To: pgsql-general@postgresql.org.pgsql-sql@postgresql.org X-Archive-Number: 200108/274 X-Sequence-Number: 13517 OK, this is silly: test=# select date_trunc('microseconds', TIME '17:12:28.125); date_trunc ------------- 17:12:28.12 (1 row) Surely one hundred and twenty three microseconds is a valid fraction of a second? Surely the default format should use microseconds and not hundreds of seconds? And even if it should use 1/100 seconds, surely it should do the rounding right? (No, it does not appear to be a floating point error: test=# select date_part('microseconds', date_trunc('microseconds', TIME '17:12:28.125')); date_part ----------- 28125000 (1 row) even though adding a little helps: test=# select date_trunc('microseconds', TIME '17:12:28.125001'); date_trunc ------------- 17:12:28.13 (1 row) ). --- Allan.