model-writtenrun 5351 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Martin Kalcher reported that trim_array() read a nonexistent first dimension for zero-dimensional arrays, producing inconsistent bounds checks, and submitted a dimension guard with a regression test in #1.
- Nathan Bossart suggested a special error message stating that the number of elements to trim must be zero in #2.
- Tom Lane declined the special error message because it would add translation work for a corner case, retaining the existing wording in #3.
- Tom Lane also identified an unguarded ARR_LBOUND(v)[0] access, explained that it could trigger invalid-memory-access reports despite its result being unused, and supplied an additional dimension guard in #3.
- After announcing that he would push the fix for the upcoming minor releases in #3, Tom Lane committed #1 with the additional guard as 4ddfbd2a8e, with backpatching through PostgreSQL 14; no further work remained in the thread.