Skip to content

Commit 2cf2a4f

Browse files
committed
> In both datetime_trunc() and timespan_trunc() in dt.c,
> the DTK_MICROSEC case is just like the DTK_MILLISEC case. > I think this is wrong and it ought to look like > fsec = rint(fsec * 1000000) / 1000000; > no? Tom Lane.
1 parent 70ce98b commit 2cf2a4f

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

doc/TODO

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ TYPES
9393
* Allow LOCALE on a per-column basis, default to ASCII
9494
* Allow array on int8[]
9595
* Remove Money type, add money formatting for decimal type
96-
* Fix typein/out functions to not be user-callable
96+
* Declare typein/out functions in pg_proc with a special "C string" data type
9797
* Add non-large-object binary field
9898
* Add index on NUMERIC type
9999

@@ -190,6 +190,7 @@ INDEXES
190190
* Improve LIMIT processing by using index to limit rows processed
191191
* Have optimizer take LIMIT into account when considering index scans
192192
* Make index creation use psort code, because it is now faster(Vadim)
193+
* Allow creation of sort temp tables > 1 Gig
193194
* Create more system table indexes for faster cache lookups
194195
* fix indexscan() so it does leak memory by not requiring caller to free
195196
* Improve _bt_binsrch() to handle equal keys better, remove _bt_firsteq()(Tom)

src/backend/utils/adt/dt.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.71 1999/05/25 16:12:00 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.72 1999/07/08 03:22:46 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1429,7 +1429,7 @@ datetime_trunc(text *units, DateTime *datetime)
14291429
break;
14301430

14311431
case DTK_MICROSEC:
1432-
fsec = rint(fsec * 1000) / 1000;
1432+
fsec = rint(fsec * 1000000) / 1000000;
14331433
break;
14341434

14351435
default:
@@ -1573,7 +1573,7 @@ timespan_trunc(text *units, TimeSpan *timespan)
15731573
break;
15741574

15751575
case DTK_MICROSEC:
1576-
fsec = rint(fsec * 1000) / 1000;
1576+
fsec = rint(fsec * 1000000) / 1000000;
15771577
break;
15781578

15791579
default:

0 commit comments

Comments
 (0)