model-writtenrun 7870 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
May 2019 - Apr 2020 · 17 entries
- Paul A Jungwirth proposed moving his range_agg extension into core to support temporal foreign keys and range coalescing, initially exposing controls for gaps and overlaps #1.
- David Fetter proposed weighted and covering aggregates, while Corey Huinker described canonical collections of disjoint ranges; Paul's first patch nevertheless returned ordinary ranges or arrays and needed separate built-in overloads because anyrange[] did not exist #2 #3 #8.
- Jeff Davis argued that the aggregate implicitly introduced multiranges and needed a coherent type and operator family, while Pavel Stehule found unstable tests, questionable code and inadequate support for custom range types; Paul accepted the broader redesign #10 #13 #15.
- The design settled on automatically creating a multirange alongside each range type, recording their relationship in pg_range and supporting anymultirange polymorphism, with overlapping or adjacent ranges canonicalized into disjoint components #26 #29.
- Jeff advised against expanding typmod support and agreed that empty ranges should disappear during canonicalization and that NULL should describe the whole multirange rather than an individual component #46 #48.
- Paul submitted the first multirange implementation with types, operators, aggregates, dump support and documentation, while explicitly leaving statistics, selectivity, GiST, SP-GiST, unnest and subscripting unfinished #53.
- Alvaro Herrera supplied compiler-warning and intersection-crash fixes; after a November rebase, Paul incorporated those fixes into the full series #54 #55 #56.
- Pavel's testing exposed binary-upgrade OID failures and invalid documentation markup, which Paul fixed by preserving the additional multirange and array OIDs during upgrade; Pavel then confirmed successful tests and documentation builds #57 #59 #60.
- Pavel objected to the unfamiliar special arithmetic operators and recommended ordinary operators plus casts, while Alvaro simplified constructors and naming helpers and recommended consolidating patches that could not build independently #60 #65 #66.
- After Tom Lane explained the limitations of generic polymorphic casts, Paul consolidated the series around explicit range-to-multirange casts and ordinary multirange arithmetic, retaining distinct multirange types and leaving typelem unset to avoid array assumptions #71 #72.
- Further review corrected documentation examples and renamed the polymorphic conversion function to multirange(anyrange), following Pavel's and Tom's objections to calling it anymultirange; Pavel then reported passing tests and readiness for committer review #74 #78 #80 #83 #84.
- Alvaro resumed detailed cache and implementation review in March, while Tom identified derived-type ownership concerns and proposed merging ranges and multiranges into a single type #85 #88 #89.
- David Fetter, Isaac Morland, Robert Haas and Jeff Davis raised semantic, usability and compatibility objections to merging the types, and David G. Johnston questioned concrete canonicalization tests; Paul explained the tests and defended separate canonical multiranges, with Alvaro acknowledging the majority for separation #92 #95 #97 #98 #101 #103 #104.
- Weighted multiranges remained outside the initial feature because they required a distinct representation, while statistics and selectivity were treated as necessary work and GiST and SP-GiST were considered optional follow-ups #103 #104.
- After prerequisite pieces had landed, Alvaro resent the remaining implementation with I/O, error-reporting and formatting changes; Paul consolidated it and corrected dependency-test ordering #107 #108 #110.
- Repeated upstream polymorphic-type changes required rebases, and Alvaro supplied more cleanup while warning that repeated range OIDs and padding made the proposed permanent storage format wasteful #111 #114 #116.
- Paul added anycompatiblemultirange support and corrected the parallel test grouping, then returned in July with multirange statistics and selectivity estimation plus ANALYZE coverage #121 #122 #126.
Jul - Oct 2020 · 1 entry
- To reduce storage overhead, Paul introduced short range records without repeated type OIDs and expanded-datum support for in-memory operations; subsequent cleanup retained that architecture, and Pavel reported successful check-world and documentation builds #128 #129 #130.
Nov - Dec 2020 · 7 entries
- Alexander Korotkov took up review after the November rebase, requested missing catalog documentation and diagnosed a race between multirangetypes and type_sanity regression tests #132 #133 #134 #136.
- Alexander found that automatically generated multirange names could change during dump restoration and proposed explicit naming, alongside a packed representation supporting direct access to component bounds; Alvaro agreed with both concerns #137 #138.
- Alexander first posted formatting and test-scheduling fixes, then substantially rewrote storage using offset/length entries, flags and bounds, removed expanded-object support, added binary searches and made pg_dump preserve explicit multirange names #139 #140.
- The final revisions documented the new interface and changed automatic-name collisions into errors directing users to MULTIRANGE_TYPE_NAME, followed by further code and comment polishing #141 #142.
- Alexander committed Paul's multirange work as 6df7a9698b, deriving it from #142 with assigned catalog OIDs, a catalog-version bump, editorial cleanup and removal of obsolete range-helper refactors.
- After the landing, Alexander submitted a five-patch follow-up fixing binary-search comparisons, adding missing range-containing-multirange operators, revising internal signatures and providing cross-type and multirange GiST indexing; these patches were still proposed in the supplied thread #143.
- Zhihong Yu corrected a typo in the follow-up's commit message, and Alexander explained that GiST's enclosing-range approximation can produce false positives across large gaps; SP-GiST support and a more ambitious index storing individual components remained future work at the thread's end #144 #146 #147.