model-writtenrun 5609 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Joseph Koshakow reported that EXTRACT truncated DAYS_PER_YEAR to 365 while date_part used 365.25, then supplied a numeric-arithmetic fix while asking about repeated constant construction and extra trailing zeros #1 #2.
- Aleksander Alekseev favored documenting the existing behavior because intervals lack calendar dates and changing results could affect users; Joseph initially agreed but identified the discrepancy as an apparently accidental regression from EXTRACT's conversion to numeric results, and Tom Lane asked Peter Eisentraut to investigate #3 #4 #5.
- Peter confirmed that truncating the fractional part was unintended and replaced Joseph's approach with multiplication and division by four, preserving integer arithmetic and correcting existing regression expectations without the original patch's additional numeric operations #6.
- Tom accepted Peter's approach and requested a comment explaining its assumptions plus parentheses around SECS_PER_DAY / 4 to avoid concern about intermediate overflow #7.
- Peter committed the replacement patch with Tom's comment and parenthesization as f2a2bf66c8, then confirmed completion in the thread's final message, leaving no outstanding work identified #6 #8.