model-writtenrun 4760 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- The thread began with Dean Rasheed announcing Joel Jacobson’s change to keep numeric.c compiling with alternative NBASE values, retaining support described as primarily historical #1.
- Tom Lane noticed that the static pow10 array lacked const qualification and suggested correcting it #2.
- Investigating further, Dean found incorrect handling of negative or zero exponents, scales divisible by DEC_DIGITS, and overflow in the numeric fallback; he attached a patch fixing these cases and adding const qualification, while noting that existing callers used only exponents 3 and 6 #3.
- Tom judged the patch reasonable by inspection and accepted that supporting negative exponents could save future work, although he had not tested it #4.
- Dean defended supporting the full input range because external C code already used the exported function and its callers could not be controlled #5.
- The attached patch #3 subsequently landed unchanged as b2d4792890, crediting Tom’s review and backpatched through PostgreSQL 14; no further revision remained pending in the supplied thread.