postgres.git / summary / log / commit / refs
commit e1ae79b99a9ccbd1022bd1c8c6dc6053d75bc9e9
Author: Bruce Momjian <bruce@momjian.us>
Date: Tue Sep 26 21:31:05 2023 +0000
First released in: 17.0, 11.22, 12.17, 13.13, 14.10, 15.5, 16.1
doc: mention GROUP BY columns can reference target col numbers
Reported-by: hape <postgres-hape@gmx.de>
Discussion: https://postgr.es/m/168871536004.379168.9352636188330923805@wrigleys.postgresql.org
Backpatch-through: 11
doc/src/sgml/ref/select.sgml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/doc/src/sgml/ref/select.sgml b/doc/src/sgml/ref/select.sgml
index 0e48cc84654..796e47c43a0 100644
--- a/doc/src/sgml/ref/select.sgml
+++ b/doc/src/sgml/ref/select.sgml
@@ -129,6 +129,9 @@ TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ]
eliminates groups that do not satisfy the given condition. (See
<xref linkend="sql-groupby" endterm="sql-groupby-title"/> and
<xref linkend="sql-having" endterm="sql-having-title"/> below.)
+ Although query output columns are nominally computed in the next
+ step, they can also be referenced (by name or ordinal number)
+ in the <literal>GROUP BY</literal> clause.
</para>
</listitem>
[parent: 6181eca090da]