Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit814c849

Browse files
Jan WieckJan Wieck
Jan Wieck
authored and
Jan Wieck
committed
Removed precision restriction in numeric_round() causing
overflow error on high precision calculations where temporaryhuge precision is required.Jan
1 parent8aad28d commit814c849

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

‎src/backend/utils/adt/numeric.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
*1998 Jan Wieck
77
*
8-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/numeric.c,v 1.8 1999/01/04 17:51:58 wieck Exp $
8+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/numeric.c,v 1.9 1999/01/05 11:10:45 wieck Exp $
99
*
1010
* ----------
1111
*/
@@ -555,7 +555,6 @@ numeric_round(Numeric num, int32 scale)
555555
* ----------
556556
*/
557557
precision=MAX(0,num->n_weight)+scale;
558-
precision=MIN(precision,NUMERIC_MAX_PRECISION);
559558
typmod= (((precision+2) <<16) |scale)+VARHDRSZ;
560559
returnnumeric(num,typmod);
561560
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp