model-writtenrun 7809 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Feb - May 2017 · 4 entries
- Dmitry Dolgov opened this thread with generic subscripting for arrays, jsonb, and custom types, using separate fetch and assignment nodes while deferring some typmod and collation work #1.
- Peter Eisentraut questioned index types and missing-key behavior, and Tom Lane explained that type-specific parsing could accept mixed subscripts while NULL results would remain consistent with existing array and jsonb operations #2 #3.
- Tom's detailed review challenged duplicated nodes, execution overhead, nested assignment, and naming; Dmitry unified the nodes and adopted the new expression executor, then corrected an accidentally malformed patch base identified by Arthur Zakirov #4 #11 #12 #14.
- Arthur's testing exposed coercion initialization and slice-metadata problems, leading to corrected parser state and cleanup across the next revisions #17 #20 #21 #25.
Jun 2017 - Apr 2018 · 6 entries
- After several months of rebasing, Dmitry split the work into infrastructure, arrays, jsonb, and documentation; Arthur then demonstrated that dropping a supporting function could break a custom type because dependencies were missing #30 #32.
- Dmitry initially proposed CREATE FUNCTION DEPENDS ON, but review favored treating subscripting as a property of the type, so the next design stored three function OIDs in pg_type and recorded their dependencies #38 #41 #50 #56.
- Arthur supplied an executor fix that initialized step fields before copying the step; Dmitry incorporated it with NULL-handling fixes and tests that Arthur subsequently verified #59 #60 #61.
- Tom's renewed review identified strictness and runtime-overhead problems, while Andres Freund advocated callback-based execution and a separate renaming patch; Dmitry responded with a single handler returning callbacks and separate parsing preparation and validation #71 #73 #74 #77 #86.
- Tom and Robert Haas clarified that generic subscripting should not imply physical containment, array polymorphism, or all existing array operations, keeping the new facility distinct from the stronger guarantees of actual arrays #78 #79 #80 #83.
- Further review refined names, moved dimension checking into array-specific code, and clarified jsonb indexing documentation; catalog-format changes and omitted LLVM handling required additional maintenance #88 #90 #92 #93 #94 #95.
Sep 2018 - Mar 2019 · 2 entries
- Pavel Stehule's tests challenged compatibility with jsonb_set when an out-of-range assignment appended at a different position, arguing that assignment must preserve the requested index rather than silently change its meaning #98 #100 #104.
- Alvaro Herrera proposed landing the independent renaming to reduce repeated rebasing, committed that portion of #114 as 558d77f20e with formatting changes, and Dmitry resent the four remaining patches #111 #120 #122.
May - Jul 2019 · 1 entry
- The remaining series continued through rebases and discussion of possible jsonpath support, while David Fetter identified a stale tutorial field reference that Dmitry corrected #125 #127 #132 #133.
Sep - Dec 2019 · 1 entry
- Nikita Glukhov added polymorphic subscripting with alternative integer/text expressions, new execution callbacks, and expanded assignment behavior; Dmitry subsequently separated array gap filling into its own patch #140 #142.
Feb - Mar 2020 · 1 entry
- Pavel tested the expanded series, found regression-output and documentation problems, and advocated keeping gap filling while postponing polymorphism; his replacement first patch and corrected full resend kept the work moving #143 #150 #155.
Jul - Sep 2020 · 2 entries
- Justin Pryzby's comment corrections were incorporated, but Tom rejected the ambiguous coercion rules of the polymorphic approach, prompting Dmitry to remove it and implement gap filling independently #157 #158 #160 #163.
- Pavel then found that empty-array assignments still lost their requested positions; Dmitry added NULL padding and rejected excessively negative subscripts, and Pavel verified the revised series with check-world and documentation builds #165 #173 #176 #177.
Nov 2020 - Feb 2021 · 18 entries
- Alexander Korotkov requested preservation of subscript-type information, but Dmitry's opaque parse-tree pointer implementation was rejected by Tom because ordinary node copying and serialization could not support it #180 #184 #185.
- After accounting for address-layout variance in performance measurements, Tom still found an undesirable execution penalty and replaced the generic wrapper layer with direct type-specific callbacks, bulk subscript processing, and no core subscript-count limit #186 #195.
- Tom then concentrated on the core feature, rewriting parser handling, adding pg_dump and dependency support, separating fixed-length and varlena array handlers, and replacing the proposed tutorial with pointers to implementation examples #197.
- Andres's LLVM prototype exposed a boolean storage-type bug; its correctness portion became 5da871bfa1, extracted from #198 with a small adaptation for backpatching.
- Tom separately extracted the assignment-leakproofness correction from the core work, moving it into the leak-detection walker and backpatching it as 62ee703313 after explaining the latent problem in #197.
- Tom reviewed Andres's function-pointer-type refactor and requested removal of redundant declarations; the remainder of #198 landed as df99ddc70b, enabling safer LLVM callback integration #203 #205.
- Tom finalized handler-controlled strictness and leakproofness, deferred unsupported volatility and strict-store options, and moved MAXDIM into the array header; the combined work from #204 and #207 landed with LLVM and documentation adjustments as c7aba7c14e #209.
- To support existing extension types and demonstrate a minimal implementation, Tom posted ALTER TYPE SUBSCRIPT and hstore subscripting together; they landed separately as 8c15a29745 and 0ec5f7e782, with documentation added to hstore #212.
- ALTER TYPE support deliberately omitted changing typelem because of physical-containment dependencies and already-stored expression types, leaving that extension out of the committed interface #216.
- Dmitry adapted the remaining jsonb work to the landed infrastructure, accepting Tom's argument that subscripting results and assignment inputs should be jsonb rather than relying on broad implicit text conversion; unlimited subscripts and assignment into NULL were included, while jsonpath remained deferred #224 #227 #231 #232.
- An attempted generic-node extension to remember original subscript types was withdrawn after Tom identified parameter-typing and dump/reload hazards; the accepted replacement used unambiguous implicit coercion to integer or text inside the jsonb implementation #234 #235 #237 #241 #243.
- Pavel's tests exposed assertions, ignored updates, and discarded index positions, so Dmitry restored gap filling and added automatic creation of missing intermediate containers #244 #246.
- Further tests uncovered missing-key failures, overwritten values, and allocation corruption; successive revisions corrected nonempty-object handling, setPath's done flag, allocation sizing, and generated jsonb structure #247 #248 #249 #250 #251 #252.
- Pavel objected to silent assignments through scalars, prompting an initially optional error patch; Dian M Fay first favored JavaScript-like no-ops but changed her position after testing update counts and triggers, establishing the case for explicit errors and clear documentation #253 #254 #256 #258 #262.
- Pavel and Dian supplied documentation and formatting fixes, and their discussion exposed the remaining scalar-as-array exception, which Dmitry removed before integrating Dian's final explanation of missing containers versus existing scalar values #265 #266 #267 #269 #270 #271.
- Pavel reported successful compilation, check-world, and documentation builds for the final series, after which Alexander Korotkov announced and completed the landing #272 #273 #274.
- The base jsonb patch from #271 became 676887a3b0 with local JsonbValue allocation/API cleanup, while its gap-filling and scalar-error patches became 81fcc72e66 and aa6e46daf5 with formatting edits.
- The thread ends after Tom reported a buildfarm SIGILL in jsonb_subscript_check_subscripts and Dmitry noted similar failures on other animals; the intended feature series had landed, but no corrective patch for those failures appears before the final message #275 #276.