提交 260fc8d5 编写于 作者: T Tom Lane

Fix improper display of fractional seconds in interval values

when using --enable-integer-datetimes and a non-ISO datestyle.

Ron Mayer
上级 3862493a
......@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/datetime.c,v 1.184.2.2 2008/06/09 19:34:09 tgl Exp $
* $PostgreSQL: pgsql/src/backend/utils/adt/datetime.c,v 1.184.2.3 2008/10/02 13:47:44 tgl Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -3723,7 +3723,7 @@ EncodeInterval(struct pg_tm * tm, fsec_t fsec, int style, char *str)
is_before = TRUE;
}
sprintf(cp, "%s%d.%02d secs", is_nonzero ? " " : "",
tm->tm_sec, ((int) sec) / 10000);
tm->tm_sec, abs((int) rint(sec / 10000.0)));
cp += strlen(cp);
#else
fsec += tm->tm_sec;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册