Fix numeric_mul() overflow due to too many digits after decimal point.
Dean Rasheed <dean.a.rasheed@gmail.com>
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+ucSXhb9U2TbA@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/adt/numeric.c | modified | +9 −1 |
| src/test/regress/expected/numeric.out | modified | +6 −0 |
| src/test/regress/sql/numeric.sql | modified | +2 −0 |
Discussion
- Numeric multiplication overflow errors 15 messages · 2021-06-28 → 2021-07-05