model-writtenrun 1268 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Peter Eisentraut proposed replacing SELECT * inside EXISTS with an empty target list during parsing, citing the SQL standard and misleading documentation about selecting a dummy constant #1.
- David Rowley pointed out that simplify_EXISTS_query() already performs the optimization #2, prompting Peter to abandon the parser change and submit documentation and code comments explaining the existing optimization and continued column-privilege checks #3.
- Tom Lane revised the user documentation to explain that output-list evaluation is eliminated when it cannot affect the row count, using a set-returning function as the exception, while retaining Peter's code comments #4.
- Peter accepted Tom's revised wording #5.
- Tom committed #4 with a minor wording adjustment as 65a3ff8f1b and announced that it was pushed #6, completing the documentation change without introducing new optimization logic.