提交 2a1ef30b 编写于 作者: T Tom Lane

Prevent infinite loop in ln_var() due to roundoff error.

Per report from Dave Marin.
上级 6c4996fa
......@@ -5,7 +5,7 @@
*
* 1998 Jan Wieck
*
* $Header: /cvsroot/pgsql/src/backend/utils/adt/numeric.c,v 1.57 2003/03/11 21:01:33 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/numeric.c,v 1.58 2003/03/14 00:15:32 tgl Exp $
*
* ----------
*/
......@@ -3872,6 +3872,9 @@ ln_var(NumericVar *arg, NumericVar *result)
break;
add_var(result, &elem, result);
if (elem.weight < (result->weight - 2 * global_rscale))
break;
}
/* Compensate for argument range reduction, round to caller's rscale */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册