mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-21 08:29:39 +08:00
Mark TimeScales constants as double to avoid integer overflow in some compilers.
This commit is contained in:
parent
dbb7503660
commit
20f8480927
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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
|
#else
|
||||||
/* note MAX_TIME_PRECISION differs in this case */
|
/* note MAX_TIME_PRECISION differs in this case */
|
||||||
static const double TimeScales[MAX_TIME_PRECISION + 1] = {
|
static const double TimeScales[MAX_TIME_PRECISION + 1] = {
|
||||||
1,
|
1.0,
|
||||||
10,
|
10.0,
|
||||||
100,
|
100.0,
|
||||||
1000,
|
1000.0,
|
||||||
10000,
|
10000.0,
|
||||||
100000,
|
100000.0,
|
||||||
1000000,
|
1000000.0,
|
||||||
10000000,
|
10000000.0,
|
||||||
100000000,
|
100000000.0,
|
||||||
1000000000,
|
1000000000.0,
|
||||||
10000000000
|
10000000000.0
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user