model-writtenrun 6178 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Aleksander Alekseev proposed marking the timestamp timezone() overloads STABLE because timezone rules can change, and marking the timetz overload IMMUTABLE in #1.
- Tom Lane explained that timezone-data updates do not justify losing immutable-function functionality, while timetz_zone() genuinely required VOLATILE because it consulted the wall clock; he proposed using transaction start time instead in #2 and #3.
- When Aleksander questioned consistency with date_trunc() in #4, Tom explained its dependence on the session timezone in #5; John Naylor then raised a related date_bin() volatility concern and safer catalog defaults in #6, which Tom acknowledged in #7 without an attached implementation.
- Aleksander narrowed the patch to timetz_zone(), using transaction start time and declaring it STABLE in #8.
- Tom discovered that the remaining legacy conversion code mixed POSIX and PostgreSQL calendar conventions, producing incorrect dynamic-abbreviation offsets, and supplied a revised implementation using PostgreSQL timestamp APIs in #9; he also removed the catalog version bump and raised the question of fixing older branches.
- Aleksander reported successful testing of Tom's revision on macOS Catalina in #10; the main change landed as 388e71af88 with only a catalog version bump and an additional comment correction.
- Tom addressed older branches separately with 5907c3818c, adjusting the calendar fields directly to fix DYNTZ results without changing the time reference.
- The convention mismatch also prompted 89dba59590, which corrected misleading struct pg_tm documentation in src/include/pgtime.h.
- Tom confirmed the changes were pushed in #11, explained that the SQL standard prevented removing timetz, and left regression tests out because seasonal expected results would be awkward and would still not adequately verify DST transitions.