model-writtenrun 2170 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Apr - Jun 2025 · 19 entries
- Sami Imseih opened the thread with a patch allowing PARAM_EXTERN values to participate in list squashing, explaining that prepared statements and common client drivers otherwise missed the optimization #1.
- Michael Paquier questioned the expression-equivalence assumptions and suggested parser-derived list boundaries, while Dmitry Dolgov expanded the parameter patch and analyzed the consequences for query identity and parameter numbering #2 #10.
- A proposed revert did not gain agreement: Álvaro Herrera favored retaining the feature, and Tom Lane explained why PARAM_EXTERN values could safely be treated like constants while arbitrary Vars and function calls could not #4 #9 #12.
- Sami demonstrated that casts and simplified function calls could leave invalid SQL in normalized query text, then proposed carrying the original list boundaries from the parser #15 #17.
- Dmitry developed a separate LocationExpr-based repair, subsequently adding ARRAY handling and location/length tracking after Junwang Zhao's feedback, while Michael requested broader tests placed before the implementation #21 #24 #30 #34 #36.
- Sami argued that a full expression node imposed unnecessary machinery and supplied a replacement using a private grammar struct and boundary fields on existing nodes; Álvaro endorsed the simpler struct approach and confirmed agreement on PARAM_EXTERN support #29 #37 #39 #41.
- Michael's review exposed insufficient coverage for multiple lists, casts, and mixed parameters, while discussion of nested casts established that the current constant checker deliberately handled only limited wrapping #43 #45 #47.
- The participants settled on preserving parameter numbers when no list is squashed and renumbering everything in textual order when a squashed list is present, avoiding confusing gaps #49 #50 #51 #52 #53.
- Sami split the work into a separately backpatchable duplicate-location numbering fix, expanded tests, the boundary repair, and external-parameter support; subsequent revisions added dedicated normalization coverage and reorganized IN and ARRAY tests following Michael's review #54 #55 #56 #57.
- Michael committed the numbering component of #57 as 35a428f30b, moving its tests into existing files, adding extended-protocol cases, and reporting backpatches through PostgreSQL 13 #58.
- Michael then reported regression failures in which IN lists stopped squashing and objected to resetting jumble state inside pg_stat_statements; Sami resent the remaining series with that reset moved into core jumbling, although he could not reproduce the failures locally #59 #60.
- Álvaro simplified the boundary repair further by removing both in_expr and the private wrapper struct, and added recursive checking of cast arguments with a non-error stack-depth guard; Sami approved this revision #62 #63.
- Michael traced the persistent failures to parse-tree serialization testing, leading Álvaro to add the missing A_Expr read/write support, which Michael then endorsed #64 #65 #66.
- The complete test and boundary-repair series from #62 landed as 0f65f3eec4, including the serialization correction and a catalog-version bump, after which Álvaro resent the remaining external-parameter patch #67.
- Sami extended the remaining patch with explicit examples of parameter numbering with and without squashed lists and clarified its comments #68.
- Álvaro committed that version with light cleanup as c2da1a5d63, accepting an existing SQL-function parameter-display oddity because the result was more useful than leaving prepared statements unsupported #69.
- Álvaro also reported adding iterative unwrapping of nested RelabelType and CoerceViaIO layers, distinguished it from the earlier recursive cast-argument work, and considered the PostgreSQL 18 open item resolved, while leaving possible normalization refinements for later #69.
- Michael endorsed the resulting behavior but found a duplicated word in the new comment; that report produced a3994ec6ac without another attached patch #70 #71.
- At the final message, the submitted work had landed and no revert had occurred; Álvaro confirmed the typo fix and explained that the remaining catalog-version concern was moot because another change had already forced a bump #71.