diff options
author | Thomas G. Lockhart <lockhart@fourpalms.org> | 2002-05-14 13:37:27 +0000 |
---|---|---|
committer | Thomas G. Lockhart <lockhart@fourpalms.org> | 2002-05-14 13:37:27 +0000 |
commit | cc2ce8363350a8492e8402f9acb25c9657325822 (patch) | |
tree | 48601183f1a5379b97386d27504c47d631a526ce /src | |
parent | 5c4e5aa3ff138408142a5d412b0809fae2e0a4f8 (diff) | |
download | postgresql-cc2ce8363350a8492e8402f9acb25c9657325822.tar.gz postgresql-cc2ce8363350a8492e8402f9acb25c9657325822.zip |
Fix lookup tables used for rounding interval data values when not using
integer datetimes. Thanks to Tom Lane for spotting the problem.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/utils/adt/timestamp.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/backend/utils/adt/timestamp.c b/src/backend/utils/adt/timestamp.c index 7637ccf150b..38a36f19577 100644 --- a/src/backend/utils/adt/timestamp.c +++ b/src/backend/utils/adt/timestamp.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.66 2002/04/21 19:48:13 thomas Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.67 2002/05/14 13:37:27 thomas Exp $ * *------------------------------------------------------------------------- */ @@ -463,23 +463,23 @@ AdjustIntervalForTypmod(Interval *interval, int32 typmod) }; #else static const double IntervalScales[MAX_INTERVAL_PRECISION+1] = { - 1000000, - 100000, - 10000, - 1000, - 100, + 1, 10, - 1 + 100, + 1000, + 10000, + 100000, + 1000000 }; static const double IntervalOffsets[MAX_INTERVAL_PRECISION+1] = { - -500000, - -50000, - -5000, - -500, - -50, - -5, - 0 + 0.5, + 0.05, + 0.005, + 0.0005, + 0.00005, + 0.000005, + 0.0000005 }; #endif |