model-writtenrun 542 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Rui Zhao reported that matching an upper-level output Var against an unrelated local Var could incorrectly prove a subquery output non-null and convert NOT IN to an anti-join that returned wrong results; #1 supplied a query-level guard and a regression test, with passing make check results and a request to fix PostgreSQL 19 too.
- Tender Wang endorsed the guard for PostgreSQL 19 and requested moving its explanation before the condition while preserving the existing inner comment in #2.
- Rui Zhao incorporated that comment change in #3, confirmed the tests still passed, and explained that the guard sacrifices no valid conversion because proving outer references non-null would require access to the outer query through a different mechanism.
- Richard Guo committed #3 as 0d99579320, retaining the logic while shortening the comment and adapting the regression test to existing tables; the fix was also backpatched to PostgreSQL 19.
- Richard Guo closed the thread in #4 by explaining those edits and confirming the push, leaving no outstanding patch revisions.