From: Bruce Momjian Date: Tue, 26 Sep 2023 21:31:06 +0000 (-0400) Subject: doc: mention GROUP BY columns can reference target col numbers X-Git-Tag: REL_13_13~69 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=9ac7fa2776a9940692677f0e4f26fe7254803929;p=postgresql.git doc: mention GROUP BY columns can reference target col numbers Reported-by: hape Discussion: https://postgr.es/m/168871536004.379168.9352636188330923805@wrigleys.postgresql.org Backpatch-through: 11 --- diff --git a/doc/src/sgml/ref/select.sgml b/doc/src/sgml/ref/select.sgml index 3af337a65cb..711f7261724 100644 --- a/doc/src/sgml/ref/select.sgml +++ b/doc/src/sgml/ref/select.sgml @@ -129,6 +129,9 @@ TABLE [ ONLY ] table_name [ * ] eliminates groups that do not satisfy the given condition. (See and below.) + Although query output columns are nominally computed in the next + step, they can also be referenced (by name or ordinal number) + in the GROUP BY clause.