aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2003-04-08 17:02:04 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2003-04-08 17:02:04 +0000
commit20f8480927f7d48e2e199e5a1eea540170eefdb9 (patch)
tree4118da274cc63e761489ff73672687c60e7b3005 /src
parentdbb750366054a1cfe9b57a32e83a1748256b69d4 (diff)
downloadpostgresql-20f8480927f7d48e2e199e5a1eea540170eefdb9.tar.gz
postgresql-20f8480927f7d48e2e199e5a1eea540170eefdb9.zip
Mark TimeScales constants as double to avoid integer overflow in some compilers.
Diffstat (limited to 'src')
-rw-r--r--src/backend/utils/adt/date.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/backend/utils/adt/date.c b/src/backend/utils/adt/date.c
index 5c098a7007a..42255a9a96f 100644
--- a/src/backend/utils/adt/date.c
+++ b/src/backend/utils/adt/date.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.80 2003/04/04 04:50:44 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.81 2003/04/08 17:02:04 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -645,17 +645,17 @@ AdjustTimeForTypmod(TimeADT *time, int32 typmod)
#else
/* note MAX_TIME_PRECISION differs in this case */
static const double TimeScales[MAX_TIME_PRECISION + 1] = {
- 1,
- 10,
- 100,
- 1000,
- 10000,
- 100000,
- 1000000,
- 10000000,
- 100000000,
- 1000000000,
- 10000000000
+ 1.0,
+ 10.0,
+ 100.0,
+ 1000.0,
+ 10000.0,
+ 100000.0,
+ 1000000.0,
+ 10000000.0,
+ 100000000.0,
+ 1000000000.0,
+ 10000000000.0
};
#endif