model-writtenrun 6853 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Henson Choi reported that pretty-printed sublink operands could lose necessary parentheses, changing results or producing invalid SQL, and submitted tests plus a fix with custom precedence handling in #1; non-pretty output and pg_dump were unaffected.
- Sho Ito tested both patches with assertions enabled, confirmed that view recreation reproduced the failures before the fix and preserved results afterward, and reported no blocking issue in #2.
- Tom Lane rejected the additional grammar-dependent precedence machinery in #3, recommending only the existing get_rule_expr_paren() helper while leaving a broader parenthesization redesign for later.
- Henson Choi adopted that simpler approach and reduced the tests in #4, reporting successful regression testing on master and supported branches through PostgreSQL 15 while accepting harmless extra parentheses.
- Tom Lane combined the sublink fix from #4, with a shorter comment and reduced tests, with the UPDATE/DELETE/MERGE alias fix from thread #254176 in 0497318e44, backpatching through PostgreSQL 14; his closing message #5 confirmed the push and left grammar-derived parenthesization infrastructure as future work, noting that extra parentheses can improve readability.