model-writtenrun 3861 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Tom Lane opened the thread with #1, responding to Alexander Lakhin's report of malformed arrays being accepted by proposing simpler sequential element storage and stricter rectangularity checks, while asking whether the change belonged in PostgreSQL 16 or 17.
- Nathan Bossart approved the initial ReadArrayStr() simplification and questioned keeping the unused ArrayGetOffset0() in #2, while Alexander's testing in #3 exposed misleading dimension-count diagnostics that Tom agreed should be addressed separately in #4.
- Nikhil Benesch proposed reducing ArrayCount() state and postponing empty-array normalization in #6; jian he tested those ideas in #8 and supplied a delta in #9.
- Tom's revision in #10 adopted delayed empty-array normalization, temporarily allowed explicit empty bounds such as '[1:0]={}', removed ArrayGetOffset0(), and separated reindentation, but rejected merging delimiter states because it obscured syntax checks.
- Heikki Linnakangas substantially changed the design in #13, introducing a tokenizer, combining dimension discovery and element conversion into one pass, and replacing permissive atoi() dimension parsing with checked strtol() parsing.
- Tom confirmed PostgreSQL 17 as the target in #14 and reconsidered explicit empty bounds because normalization would discard their lower bounds; Heikki agreed in #15 that preserving existing behavior was preferable.
- After finding initialization concerns and acceptance of trailing commas in #16, jian he supplied a fix-up in #17 and expanded it into the full series in #18, adding integer-bound checks and removing redundant validation, followed by an unused-variable cleanup in #19.
- Alexander found missing end-of-input details, an accepted trailing comma after an empty subarray, and lost escaped characters in #20; jian addressed these in #21, then corrected the uninitialized previous-token variable Alexander reported in #22 with #23.
- Alexander's further reviews in #24 and #26 led to consistent quoting diagnostics, more tests, comment corrections, and debug-output cleanup in #25 and #27, with Alexander reporting that the series looked good from a user's perspective.
- Following the October rebase in #28, Tom resumed review and consolidated the series into #29, retaining the single-pass design while introducing StringInfo scratch storage, simplifying delimiter tracking, strengthening overflow checks, and fixing escaped NULL handling.
- The consolidation in #29 also removed the unused ARRAYDEBUG facility and finally withdrew explicit empty-bound support, implementing the compatibility decision reached in #14 and #15.
- Alexander tested the consolidated version and found an obsolete documentation example in #30; Tom corrected it in #32, also adding targeted incorrect-quoting diagnostics and fixing a hard-error path to respect soft-error handling.
- Heikki approved the final version in #33 while requesting clearer initialization contracts; Tom incorporated those comment-only changes and committed #32 as 83472de606, crediting Tom, Heikki, and jian as authors and Alexander for reporting and testing.
- Heikki also renewed the inaccurate dimension-count complaint in #33, and Tom explained in #34 that omitting an unknown count was preferable to delaying errors merely to calculate it.
- At the thread's last message, #35, Tom announced that the main rewrite had landed and posted a separate diagnostic delta for array_in() and PL/Perl, leaving messages unchanged where the actual dimensionality was known; that delta subsequently landed unchanged as 8d5573b92e, completing both tracked changes.