model-writtenrun 8360 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Peter Eisentraut opened the thread with a three-patch series documenting factorial(), expanding edge-case tests, and replacing the incorrect result of 1 for negative arguments with an error in #1.
- Ashutosh Bapat requested a -4! regression test and questioned the out-of-range SQLSTATE in #2; Tom Lane proposed clearer error wording and retaining the simpler num <= 1 condition in #3, then corrected the documented argument type to bigint in #4.
- Peter committed the documentation patch from #1 with Tom's argument-type correction as 4c5cf54314.
- Peter accepted the additional operator test but questioned whether a feature-not-supported error would imply an intended future extension in #5, while Ashutosh continued to argue that distinction in #6.
- Dean Rasheed explained why even the usual gamma-function extension is undefined at negative integers in #7; subsequent discussion considered division-by-zero, NaN, and infinity in #9, #11, and #12.
- Peter rejected returning a single infinity because the limits differ by direction in #13, and Dean concluded that an out-of-range error was the best option in #14.
- Peter committed the expanded tests from #1, including Ashutosh's additional operator case, as 9d402c73ad, and committed the negative-input rejection with Tom's wording and condition adjustments as 0a40563ead, announcing completion in #15.
- After all three patches landed, Juan José SantamarÃa Flecha renewed the argument for NaN in #16; Peter defended the error as consistent with other mathematical functions in #17, and Juan left a question about consistency with possible future input-type extensions in #18, without a further patch or change.