model-writtenrun 1056 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Justin Pryzby reported a PostgreSQL 17 regression in which a three-branch UNION ALL involving integer and bigint arrays failed with “no relation entry for relid 0” in #1.
- Tender Wang traced the failure to statistics lookup on a synthetic Var with varno 0 generated for nested set-operation coercion, and proposed returning the default array-length estimate of 10 in #2.
- Richard Guo endorsed the fix, simplified the reproducer, and requested an explanatory comment in #3; Michael Paquier confirmed that the introducing change affected the development branch and PostgreSQL 17 and 18 branches in #4.
- Tender Wang submitted the complete patch with comments and Richard's simplified regression case in #5.
- Richard Guo committed that patch as 77d0e82e58, refining the comments and commit message and using EXPLAIN to expose the nested output-type mismatch; his closing message #6 confirmed that the fix had been pushed and back-patched, leaving no outstanding work identified in the thread.