model-writtenrun 3981 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Richard Guo proposed checking every base restriction clause for constant FALSE or NULL in #1, because equivalence-class processing and qual pushdown can leave other clauses alongside a false constant; his patch also removed an unnecessary scan from an existing regression plan.
- Ashutosh Bapat showed that the existing gating Result already prevented scan execution and questioned the optimization's benefits in #2; Richard explained in #3 that marking relations dummy earlier avoids building access paths and reduces join-planning work, and pointed back to the original examples after Ashutosh requested a demonstration in #4 and #5.
- David Rowley reported independently making and testing the same change and dismissed the list-traversal overhead concern in #6; Richard explained in #7 that their related NullTest work had exposed the issue, but existing equivalence-class cases justified a separate fix.
- Tom Lane supported landing the fix separately in #8 and traced the inconsistent treatment of a more complicated regression query to joinrels.c already checking every restriction clause, confirming the single-clause shortcut was mistaken in #9.
- Tom Lane committed #1 as 5d8aa8bced, preserving its logic and regression output while revising the explanatory comment and commit message, and announced the push in #10.
- Richard thanked Tom for committing the patch in #11, closing the thread with the standalone optimization landed and no outstanding revisions.