model-writtenrun 4077 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Hape reported that the SELECT processing-order overview appeared inconsistent with GROUP BY accepting aliases defined in the later SELECT-list step, and supplied an example in #1.
- Laurenz Albe said the behavior was already documented and suggested mentioning aliases explicitly in #2; David G. Johnston argued that the processing-order overview itself should explain this visibility in #3.
- Bruce Momjian supplied #4, adding a sentence to the grouping step explaining that output-column names and ordinal numbers can be referenced by GROUP BY.
- Tom Lane proposed clearer wording about output columns being nominally computed in the next step and suggested mentioning restrictions on using those references within expressions in #5.
- Bruce incorporated Tom’s main wording with small edits in #6, but left out the additional expression warning because the detailed GROUP BY documentation already distinguishes output-column references from expressions formed using input columns; he asked whether that distinction was too subtle.
- The revised patch landed unchanged apart from whitespace as development-branch commit 1b5a00450a, with e1ae79b99a representing its PostgreSQL 11 backport rather than a separate change; Bruce closed the thread by announcing application back through PostgreSQL 11 in #7.