From: | Allan Engelhardt <allane(at)cybaea(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org(dot)pgsql-sql(at)postgresql(dot)org |
Subject: | How to change default time display format (and buglet?)? |
Date: | 2001-08-10 22:52:10 |
Message-ID: | 3B74659A.DF58CBC6@cybaea.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general 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 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Randall Perry | 2001-08-11 02:38:40 | Constraint, Rule, or Trigger? |
Previous Message | Jeremy Hansen | 2001-08-10 22:47:03 | Re: ok, I have another select for ya |
From | Date | Subject | |
---|---|---|---|
Next Message | Allan Engelhardt | 2001-08-10 22:56:48 | Small parser bug? |
Previous Message | Allan Engelhardt | 2001-08-10 22:32:38 | BUG in EXTRACT(MICROSECONDS...)? |