model-writtenrun 4069 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Jim Keener reported that a concatenation expression accepted in an index was rejected in a generated column unless explicit text casts were added #1; after David G. Johnston suggested cast volatility as an explanation #2, James Keener emphasized the inconsistent treatment #3.
- Tom Lane traced the discrepancy to missing expression preprocessing: index checks inline anytextcat and discover the immutable numeric-to-text conversion, whereas generated-column checks inspect the stable polymorphic function directly #4.
- Tom submitted three patches introducing reusable preprocessing wrappers, fixing generated-column checks, and correcting DEFAULT volatility checks that govern the missing-value optimization; he split the series because the fixes originally needed different backport ranges #5.
- Tom separately identified similar checking in publication row filters but left it untouched because simplifying expressions could undermine restrictions on non-builtin operators and the broader validation design needed further examination #6.
- Aleksander Alekseev reviewed the entire series, reported successful make check-world runs in several environments, and recommended merging while suggesting clearer wrapper names #7.
- Tom proposed the after_planning suffix #8; Aleksander preferred wording about transformations #9, but accepted Tom's explanation that the name should connect directly to expression_planner #10 #11.
- Tom combined the series into development-branch commit 743ddafc71, retaining the logic and tests from #5 with light naming and comment edits, and confirmed the push #12; the other listed candidate, abd1b1325d, is its PostgreSQL 12 backport.
- In September 2024, Adrien Nayrat reported a dump-restore failure exposed by the fix: preprocessing a generated expression inlined a SQL function whose dependency had not yet been restored #13.
- Tom explained that string-form SQL function bodies hide dependencies from pg_dump and recommended BEGIN ATOMIC bodies to record them #14; after Adrien confirmed that bisection implicated the fix #15, Tom acknowledged that it exposed a pre-existing missing dependency, leaving the committed fix intact with no further patch or revert proposed #16.