model-writtenrun 7892 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Tom Lane proposed replacing PL/pgSQL's separate array-assignment implementation with core SQL assignment machinery to support array slices, nested composite fields and datatype-specific subscripting; his initial patch used synthetic SET syntax and preserved historical coercion rules through COERCION_PLPGSQL #1.
- Chapman Flack suggested a more generic coercion name and less confusing target syntax #2, while Pavel Stehule suggested LET as a possible foundation for schema variables #3; Tom explained the compatibility constraints and proposed passing parser annotations outside the query text #4.
- Tom developed the alternative of injecting special initial tokens selected by a raw-parser mode #5, then posted a six-patch implementation with SPI_prepare_extended, direct expression and assignment parsing, regression tests and documentation #6.
- The series also proposed removing ARRAYELEM datums and the rarely useful ability to target array elements with GET DIAGNOSTICS, because retaining that feature required disproportionate code and reimplementing it could slow execution #6.
- Pavel successfully tested nested arrays and records #7, but his benchmarks exposed an approximately threefold slowdown for array-element sorting and a smaller apparent slowdown in arithmetic #8.
- Tom posted an incremental relaxation of read/write-parameter checks #9; Pavel confirmed that sorting became faster than master and traced the arithmetic discrepancy to compiler options #10.
- Tom then recognized that the relaxation could allow nested functions to modify the original array unsafely, so he replaced it with tracking of exactly one writable Param while leaving other references read-only, and reposted the unchanged six earlier patches alongside that redesign #11.
- Pavel tested the redesigned optimization #12, reported successful check-world and an approximately 11 percent overall benchmark improvement #13, and tested plpgsql_check while requesting clearer documentation of SELECT INTO target limitations #14; Tom accepted the documentation concern but noted that the limitation predated this work #15.
- Pavel's final review questioned NULL and oversized-source slice assignments while reporting passing tests and no benchmark regressions #17; Tom demonstrated that these behaviors came from existing UPDATE semantics #18, and Pavel left changing those semantics as a separate concern #19.
- On January 4, Tom committed the first two patches from #11 as 844fe9f159, with a grammar-production rename and minor comment and formatting changes.
- Tom committed the expression parser, assignment parser, documentation and tests from #11 together as c9d5298485, matching those three patches after rebasing.
- Tom committed the ARRAYELEM removal from #11 as 1788828d33, including removal of array-element GET DIAGNOSTICS targets while retaining RECFIELD support.
- Tom completed the series by committing the redesigned read/write-parameter mechanism from #11 as 1c1cbe279b, adding only explanatory comment changes.
- After all seven components had landed, Pavel reported that parentheses needed to distinguish nested jsonb subscripting were rejected on assignment targets #20, then illustrated the differing parentheses requirements for nested composite assignments and expressions #21; the thread ends without a patch resolving those remaining syntax limitations.