Commit cc2ce836 authored by Thomas G. Lockhart's avatar Thomas G. Lockhart

Fix lookup tables used for rounding interval data values when not using

 integer datetimes. Thanks to Tom Lane for spotting the problem.
parent 5c4e5aa3
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * 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) ...@@ -463,23 +463,23 @@ AdjustIntervalForTypmod(Interval *interval, int32 typmod)
}; };
#else #else
static const double IntervalScales[MAX_INTERVAL_PRECISION+1] = { static const double IntervalScales[MAX_INTERVAL_PRECISION+1] = {
1000000, 1,
100000,
10000,
1000,
100,
10, 10,
1 100,
1000,
10000,
100000,
1000000
}; };
static const double IntervalOffsets[MAX_INTERVAL_PRECISION+1] = { static const double IntervalOffsets[MAX_INTERVAL_PRECISION+1] = {
-500000, 0.5,
-50000, 0.05,
-5000, 0.005,
-500, 0.0005,
-50, 0.00005,
-5, 0.000005,
0 0.0000005
}; };
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment