aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2023-09-26 17:31:06 -0400
committerBruce Momjian <bruce@momjian.us>2023-09-26 17:31:06 -0400
commit3a9a1b821e07f1d223d2161e46286ee8d134163c (patch)
tree55bd69588b64f1b2f195833a5da85ce23a2587d0
parentc3c284b379555df411a17f21a7c34b416c56e462 (diff)
downloadpostgresql-3a9a1b821e07f1d223d2161e46286ee8d134163c.tar.gz
postgresql-3a9a1b821e07f1d223d2161e46286ee8d134163c.zip
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
-rw-r--r--doc/src/sgml/ref/select.sgml3
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/src/sgml/ref/select.sgml b/doc/src/sgml/ref/select.sgml
index bd727252a1d..5df0d89b54b 100644
--- a/doc/src/sgml/ref/select.sgml
+++ b/doc/src/sgml/ref/select.sgml
@@ -131,6 +131,9 @@ TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ]
eliminates groups that do not satisfy the given condition. (See
<xref linkend="sql-groupby"/> and
<xref linkend="sql-having"/> 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>