model-writtenrun 5050 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Adrian Klaver reported that casting the exponent to numeric made 10^-18 return zero in #1; Erik Wienhold explained overload selection in #2, and Peter J. Holzer reproduced the problem on an older release and demonstrated that increasing the base's scale avoided it in #3.
- Tom Lane identified that the integer-exponent path ignored negative result weight and proposed moving scale selection into power_var_int(), where the result weight was already estimated, in #4.
- Dean Rasheed proposed matching the non-integer path's significant-digit policy, noting that this would reduce decimal places for some large results, in #5, and Tom endorsed that tradeoff in #6.
- Dean submitted #8, moving overflow and underflow checks ahead of scale selection, tightening the overflow threshold, adding powers-of-ten tests, and regenerating numeric_big expectations against bc; he initially favored back-patching.
- Robert Haas argued that changing query results in stable releases could break applications in #9, and Dean accepted that objection.
- Dean committed #8 as 40c7fcbbed, additionally preserving the exponent's display scale and adjusting regression tests, then confirmed in #10 that the fix had landed on HEAD only, with no remaining patch under discussion.