From: Bruce Momjian Date: Sat, 3 May 2025 16:57:18 +0000 (-0400) Subject: doc PG 18 relnotes: add GROUP BY column elimination item X-Git-Tag: REL_18_BETA1~15 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=24987c6f0687576da97b593c6dd5740ccdd23277;p=postgresql.git doc PG 18 relnotes: add GROUP BY column elimination item With a nod to PG 9.6. Reported-by: jian he Discussion: https://postgr.es/m/CACJufxEqs=EXZETwtaOooTFhZrtxvSWg8M2uPfzjNtS3wQ6Dzw@mail.gmail.com --- diff --git a/doc/src/sgml/release-18.sgml b/doc/src/sgml/release-18.sgml index 66cdeb67961..33e9199d758 100644 --- a/doc/src/sgml/release-18.sgml +++ b/doc/src/sgml/release-18.sgml @@ -284,6 +284,23 @@ This optimization can be disabled using enable_distinct_reordering. + + + + +Ignore GROUP BY columns that are functionally dependent on other columns (Zhang Mingli, Jian He, David Rowley) +§ + + + +If a GROUP BY clause includes all columns of a unique index, as well as other columns of the same table, those other columns are redundant and can be dropped +from the grouping. This was already true for non-deferred primary keys. + + +