Skip to content
Snippets Groups Projects
Commit 1392cbd0 authored by Tom Lane's avatar Tom Lane
Browse files

AdjustTimeForTypmod has the same bug ...

parent 04d975f0
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.60 2001/10/04 14:49:57 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.61 2001/10/04 15:14:22 tgl Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -28,8 +28,7 @@
#include "utils/timestamp.h"
static void
AdjustTimeForTypmod(TimeADT *time, int32 typmod);
static void AdjustTimeForTypmod(TimeADT *time, int32 typmod);
/*****************************************************************************
* Date ADT
......@@ -502,7 +501,10 @@ AdjustTimeForTypmod(TimeADT *time, int32 typmod)
static int32 TimeTypmod = 0;
if (typmod != TimeTypmod)
TimeScale = pow(10, typmod);
{
TimeScale = pow(10.0, typmod);
TimeTypmod = typmod;
}
*time = (rint(((double) *time)*TimeScale)/TimeScale);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment