model-writtenrun 5623 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Joseph Koshakow opened the thread with overflow checks for scaled interval units in #1, and Tom Lane recommended checked integer arithmetic that also catches addition overflow in #2, leading to #3.
- Joseph expanded the patch to fractional-unit accumulation and AGO negation in #4 and #7, then adopted Andres Freund's boolean-return recommendation from #5 and #8 in #10.
- When Andres raised backpatching in #8, Tom opposed introducing this behavioral change in minor releases in #9.
- Joseph added ISO8601 checks in #13 but withdrew seconds-field checks because pg_tm could overflow even when the final Interval value remained representable.
- Joseph's broader draft in #15 introduced an interval-specific structure with wider time fields and extended the work to output conversion, formatting, and ECPG's copied interval code.
- Tom identified portability and shared-code problems in #16 and recommended treating ECPG modernization as a separate project; Joseph confirmed that converting through pg_tm could still overflow upstream in #17.
- Joseph redesigned the patch in #18 around separate input and output structures, accumulating sub-day input directly as microseconds and removing the ECPG changes.
- Joseph demonstrated in #19 that existing code could store an interval successfully but subsequently fail to display its table, strengthening the case for fixing both input and output conversions.
- After intervening source changes, Tom rebased the patch in #20, then substantially revised shared parsing, formatting, and arithmetic in #23, while questioning whether merged time fields preserved SQL-standard sign semantics.
- Tom demonstrated the sign regression in #24 and first committed historical-behavior tests as 1b208ebaf1, without posting an attached test patch.
- Joseph supplied a sign-handling delta in #28, while Tom's full revision in #29 handled both numeric units and hh:mm:ss input; Tom explained the additional coverage in #30.
- Tom also resolved Joseph's floating-point concern in #29 by showing that the fractional microsecond calculations stayed within double's exact integer range.
- Tom landed #29 with minor block cleanup as e39f990467 and announced it in #32; the commit declined backpatching because the new structures changed public conversion APIs.
- Buildfarm failures reported in #33 exposed platform-dependent handling of a bare decimal point by strtod, which Joseph diagnosed in #34 and Tom confirmed through platform testing in #36 and #38.
- Joseph explained why ISO8601 parsing needed a digit check rather than an end-of-string check in #39 and supplied #40; Tom expanded it to other datetime parsers and preserved rejection of digitless fields in #41.
- Tom committed #41 plus a formatting.c initialization-order fix as 591e088dd5; Joseph's favorable response in #42 came after the commit, so it does not establish pre-commit review coverage.
- By the final response in #42, the overflow redesign, historical-behavior tests, and portability follow-up had landed, while the ECPG modernization proposed in #15 remained outside this work as requested in #16.