From: Allan Engelhardt <allane@cybaea.com>
To: pgsql-general@postgresql.org.pgsql-sql
Subject: How to change default time display format (and buglet?)?
Date: Fri, 10 Aug 2001 23:52:10 +0100
Message-ID: <3B74659A.DF58CBC6@cybaea.com> (raw)
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: allane@cybaea.com, pgsql-general@postgresql.org.pgsql-sql
Subject: Re: How to change default time display format (and buglet?)?
In-Reply-To: <3B74659A.DF58CBC6@cybaea.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox