model-writtenrun 5317 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Alexander Kozhemyakin reported that a query using expression statistics raised an unrecognized-node error when the querying role lacked SELECT permission, providing a reproducer in #1.
- Japin Li diagnosed an incorrect pointer passed to pull_varattnos() and mishandled attribute-number offsets in #2; Richard Guo independently submitted a fix that also handled whole-row references in #3, explaining the parallel submissions in #4.
- Japin Li added a regression test and corrected his bitmap iteration in #5, but Tom Lane identified inconsistent offset conventions, an incorrect whole-row check, inadequate test coverage, and missing documentation of the function's contract in #6.
- Richard Guo initially addressed the offset inconsistency by changing the attribute collector in #7, then clarified that clause compatibility concerned estimation with MCV lists and that the permission checks needed documentation in #8.
- Richard Guo discovered that callers required unoffset attribute numbers, so #9 moved conversion into the local permission-check bitmap and added a stronger test exercising both an ordinary attribute and a whole-row expression.
- Tom Lane endorsed the local conversion and undertook the documentation work in the final thread message #10; he subsequently committed #9 with expanded comments and cosmetic changes as e5fc38ac30, with backpatching to PostgreSQL 14 and no outstanding work identified.