model-writtenrun 2387 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Sep - Dec 2024 · 12 entries
- Junwang Zhao proposed a general-purpose array_sort using tuplesort, initially restricted to empty or one-dimensional arrays without NULL elements and accepting textual direction and collation arguments #1.
- Following Andreas's off-list suggestion, Junwang replaced the collation argument with SQL COLLATE #2; jian he proposed boolean controls and NULL support #3, while David G. Johnston advocated textual direction and NULL-placement options modeled on CREATE INDEX #5, which Junwang implemented #6.
- Jian's review prompted broader whitespace handling and collation tests #7 #8, then a reported failure with an unsortable custom type led to explicit missing-operator errors #9 #10.
- Amit Langote identified locale-dependent regression results #11, and Junwang switched the tests to ASCII data with explicit C collation #12.
- After Jian tested composite elements and multidimensional inputs #15, Tom Lane argued that a general-purpose function should sort anything ORDER BY can handle #17; Junwang added sorting of first-dimension subarrays #18.
- Aleksander Alekseev questioned the complexity of the option interface #23, David defended direct sorting controls #24, and Tom rejected parsing textual sort clauses #25; Junwang adopted boolean controls and separated them from basic sorting, also caching element and array type entries independently #29.
- Aleksander's review led to immutable basic sorting, clearer collation and NULL documentation, and complete boolean-combination tests #30 #33; his proposal to remove wrappers was declined because catalog sanity checks require separate entry points for differing argument counts #34 #35.
- After a documentation markup fix #36 and a rebase following array_reverse #37, Michael Paquier requested singleton fast paths, negative tests and closer examination of caching #38, while Dean Rasheed demonstrated that sorting lost nondefault array bounds #40.
- Jian supplied a rebased basic patch plus bounds-preservation and ArrayMetaState-cache fixes #42; Junwang folded those changes into the main implementation, simplified bounds restoration, restored the optional-controls patch and credited Jian as co-author #47.
- Robert Haas argued that unsupported types should error even when no sorting is needed #48, leading Junwang to move operator validation before the fast exit #52.
- Michael investigated collation interactions across multiple values #51, and Junwang and Jian concluded that parser collation resolution, PG_GET_COLLATION() and existing comparison errors supplied the required behavior #52 #53.
- Jian maintained the series with error-code and documentation revisions in December #54, rebased it in March #55, and added int2vector coverage after an upstream change corrected array construction behavior #56, with Junwang agreeing to the tests #57.
Mar - Apr 2025 · 4 entries
- Tom substantially reworked the implementation into a shared C worker with SQL wrappers, simplified caching, made true mean descending, marked every overload immutable and restored the fast exit before operator validation #58; he also merged the two feature patches and preserved bounds directly in the result array.
- Junwang accepted Tom's rework #59, and Tom then added a separate patch caching typarray in typcache to avoid an extra lookup #60; Junwang reported successful regression tests and endorsed the addition #61.
- Tom committed both patches from #60 together as 6c12ae09f5, with only a documentation wording adjustment and catalog-version bump beyond the submitted series, and announced the push #62.
- The thread ended with the complete feature and typcache support landed, and Junwang confirmed that the commitfest entry was marked committed #63.