From 8bc6144da686b3d1350fa38ec1c529338fc97813 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Thu, 8 Jul 1999 03:22:46 +0000 Subject: [PATCH] > 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. --- doc/TODO | 3 ++- src/backend/utils/adt/dt.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/TODO b/doc/TODO index 99bccdfd87..244941da22 100644 --- a/doc/TODO +++ b/doc/TODO @@ -93,7 +93,7 @@ TYPES * Allow LOCALE on a per-column basis, default to ASCII * Allow array on int8[] * Remove Money type, add money formatting for decimal type -* Fix typein/out functions to not be user-callable +* Declare typein/out functions in pg_proc with a special "C string" data type * Add non-large-object binary field * Add index on NUMERIC type @@ -190,6 +190,7 @@ INDEXES * Improve LIMIT processing by using index to limit rows processed * Have optimizer take LIMIT into account when considering index scans * Make index creation use psort code, because it is now faster(Vadim) +* Allow creation of sort temp tables > 1 Gig * Create more system table indexes for faster cache lookups * fix indexscan() so it does leak memory by not requiring caller to free * Improve _bt_binsrch() to handle equal keys better, remove _bt_firsteq()(Tom) diff --git a/src/backend/utils/adt/dt.c b/src/backend/utils/adt/dt.c index 2ec38ce2d1..575345a47f 100644 --- a/src/backend/utils/adt/dt.c +++ b/src/backend/utils/adt/dt.c @@ -1429,7 +1429,7 @@ datetime_trunc(text *units, DateTime *datetime) break; case DTK_MICROSEC: - fsec = rint(fsec * 1000) / 1000; + fsec = rint(fsec * 1000000) / 1000000; break; default: @@ -1573,7 +1573,7 @@ timespan_trunc(text *units, TimeSpan *timespan) break; case DTK_MICROSEC: - fsec = rint(fsec * 1000) / 1000; + fsec = rint(fsec * 1000000) / 1000000; break; default: -- 2.39.5