model-writtenrun 2359 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Chapman Flack proposed viewing PL execution as preparation, call-site specialization, and invocation, asking whether FmgrInfo reuse could invalidate cached specializations and whether a safety flag was needed #1.
- Tom Lane confirmed that query call sites have separate FmgrInfo structures and suggested funccache for reuse across queries, but warned that anyarray element types can change between calls; VARIADIC ANY support remained a possible future extension #2 #3 #5 #6.
- Chapman reported that a transform explicitly requested by a routine could be dropped, and Tom discovered that ProcedureCreate instead recorded dependencies on transforms for argument and result types, even without a TRANSFORM clause; Chapman confirmed his failing case used a transform only for values encountered internally #7 #8 #9.
- Tom submitted a patch passing explicitly selected transform OIDs into ProcedureCreate, proposing a development-branch-only fix because changing its signature in stable branches was risky and alternatives added complexity #10.
- Returning to specialization, Chapman demonstrated that statistics-column calls leave anyarray unresolved while combinations requiring its element type are rejected, giving his dispatcher a way to recognize the exceptional case #11.
- Tom committed the dependency fix with only an added catalog-version bump; the commit declined backpatching because of API compatibility, the absence of earlier complaints, and the inability to repair existing dependencies consistently #10 b73e6d71a8.
- Chapman subsequently questioned storing transformable type OIDs rather than transform OIDs; Pavel Stehule supplied historical context, Tom defended fast type-based filtering, and Chapman argued that preloading transform metadata could retain that efficiency while making dependencies explicit #13 #14 #15 #16.
- Tom saw insufficient benefit to justify a compatibility-breaking redesign and wanted finer control over which arguments are transformed; Chapman proposed named transform groups and possible per-parameter declarations, without submitting another patch #17 #18.
- Chapman identified duplicate transform types, inaccessible array transforms, and inconsistent domain handling; Tom favored matching declared types directly and highlighted further differences between PL/Python and PL/Perl handling of arrays and composites, while Chapman found no apparent SQL-standard obstacle to that simplification #19 #20 #21 #22.
- The thread ended with the dependency fix landed and broader semantics unresolved: Tom raised polymorphic arguments and results, and Chapman supported applying transforms after specialization and to relevant trigger-tuple components #23 #24 #25.