model-writtenrun 3598 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Joseph Koshakow proposed checked arithmetic to prevent overflow and underflow when rounding intervals to a specified precision, with regression tests for both signs in #1.
- Tom Lane requested ereturn instead of ereport to match AdjustIntervalForTypmod's error handling and suggested that the rare problem did not warrant back-patching in #2.
- Andres Freund raised a related proposal to enable -ftrapv in assertion builds so testing tools could detect signed overflow more easily, without reviewing the attached patch itself, in #3.
- Joseph Koshakow supplied the revised error handling and agreed against back-patching in #4.
- Tom Lane committed #4 as 5ebc9c9017, changing rounding to remainder subtraction and keeping negative values negative during checked arithmetic; he confirmed the HEAD-only landing and explained the rounding change in #5.
- The interval fix was complete, but the broader overflow-testing discussion remained open: Joseph Koshakow returned in #6 to support trapping overflows and ask how to enable the compiler flags and help resolve remaining failures.