Fix numeric_mul() overflow due to too many digits after decimal point. This fixes an overflow error when using the numeric * operator if the result has more than 16383 digits after the decimal point by rounding the result. Overflow errors should only occur if the result has too many digits *before* the decimal point.
Discussion: https://postgr.es/m/caezatcumefwcrq2dnzzprj5+6lfn85jyidoqm+ucsxhb9u2...@mail.gmail.com Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/54a0ec1bd6d5f46938b8da7bbcf7c3cb26b8638d Modified Files -------------- src/backend/utils/adt/numeric.c | 10 +++++++++- src/test/regress/expected/numeric.out | 6 ++++++ src/test/regress/sql/numeric.sql | 2 ++ 3 files changed, 17 insertions(+), 1 deletion(-)