How to change default time display format (and buglet?)? - Mailing list pgsql-sql

From Allan Engelhardt
Subject How to change default time display format (and buglet?)?
Date
Msg-id 3B74659A.DF58CBC6@cybaea.com
Whole thread Raw
List pgsql-sql
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
microsecondsand 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.


pgsql-sql by date:

Previous
From: Allan Engelhardt
Date:
Subject: BUG in EXTRACT(MICROSECONDS...)?
Next
From: "Timothy H. Keitt"
Date:
Subject: Re: Re: Fuzzy matching?