]> granicus.if.org Git - postgresql/commitdiff
Removed precision restriction in numeric_round() causing
authorJan Wieck <JanWieck@Yahoo.com>
Tue, 5 Jan 1999 11:10:45 +0000 (11:10 +0000)
committerJan Wieck <JanWieck@Yahoo.com>
Tue, 5 Jan 1999 11:10:45 +0000 (11:10 +0000)
overflow error on high precision calculations where temporary
huge precision is required.

Jan

src/backend/utils/adt/numeric.c

index 34a7b394310444f56e009cdf5d53e8ae919047f6..271863de381ac4e0bac8e4e15cd0950779a617a8 100644 (file)
@@ -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);
 }