提交 814c8495 编写于 作者: J Jan Wieck

Removed precision restriction in numeric_round() causing

overflow error on high precision calculations where temporary
huge precision is required.

Jan
上级 8aad28da
......@@ -5,7 +5,7 @@
*
* 1998 Jan Wieck
*
* $Header: /cvsroot/pgsql/src/backend/utils/adt/numeric.c,v 1.8 1999/01/04 17:51:58 wieck Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/numeric.c,v 1.9 1999/01/05 11:10:45 wieck Exp $
*
* ----------
*/
......@@ -555,7 +555,6 @@ numeric_round(Numeric num, int32 scale)
* ----------
*/
precision = MAX(0, num->n_weight) + scale;
precision = MIN(precision, NUMERIC_MAX_PRECISION);
typmod = (((precision + 2) << 16) | scale) + VARHDRSZ;
return numeric(num, typmod);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册