doc: mention GROUP BY columns can reference target col numbers
authorBruce Momjian
Tue, 26 Sep 2023 21:31:06 +0000 (17:31 -0400)
committerBruce Momjian
Tue, 26 Sep 2023 21:31:06 +0000 (17:31 -0400)
Reported-by: hape
Discussion: https://postgr.es/m/168871536004.379168.9352636188330923805@wrigleys.postgresql.org

Backpatch-through: 11

doc/src/sgml/ref/select.sgml

index 3af337a65cb5e08d282c0532c153677beb517ddb..711f7261724a173acb765cf50a623a42ed58437f 100644 (file)
@@ -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.