Re: Rounding issue with current_time - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Rounding issue with current_time
Date
Msg-id 6237.1002130458@sss.pgh.pa.us
Whole thread Raw
In response to Rounding issue with current_time  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Further experimentation:

regression=# create table foo3 (f1 date default current_date,
regression(# f2 time(3) default current_time,
regression(# f3 timestamp(3) default current_timestamp);
CREATE
regression=# insert into foo3 default values;
(multiple times)
regression=# select * from foo3;    f1     |    f2    |             f3
------------+----------+-----------------------------2001-10-03 | 13:32:07 | 2001-10-03 13:32:07-042001-10-03 |
13:32:08| 2001-10-03 13:32:08.3020-042001-10-03 | 13:32:09 | 2001-10-03 13:32:09.4280-042001-10-03 | 13:32:10 |
2001-10-0313:32:10.2530-042001-10-03 | 13:32:10 | 2001-10-03 13:32:10.8850-042001-10-03 | 13:32:11 | 2001-10-03
13:32:11.2930-042001-10-03| 13:32:11 | 2001-10-03 13:32:11.6650-042001-10-03 | 13:32:12 | 2001-10-03
13:32:12.04-042001-10-03| 13:32:13 | 2001-10-03 13:32:13.3730-04
 
(9 rows)

So the real issue appears to be that subsecond resolution isn't
propagating into time and timetz at all.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Rounding issue with current_time
Next
From: Tom Lane
Date:
Subject: Re: Unicode combining characters