pgsql: Revert "Add GROUP BY ALL".

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Revert "Add GROUP BY ALL".
Date: 2026-07-17 20:14:33
Message-ID: E1wkox6-000fl4-1F@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Revert "Add GROUP BY ALL".

This reverts commit ef38a4d9756db9ae1d20f40aa39f3cf76059b81a which
implemented the GROUP BY ALL syntax, as well as 2ce745836 which
made some comment improvements therein.

A postcommit review discovered that GROUP BY ALL missed our special
handling of entries that also appear in an ORDER BY in the query.
This caused the query to return wrong results when ORDER BY
specifies non-default equality semantics. While this should be
fixable with some refactoring, doing it cleanly seems like too
much code churn for late beta. We'll revert and try again in v20.

The reverted commit also included some additional comment wordsmithing
and docs cleanup, which are retained as they weren't connected to the
reverted feature.

catversion bump needed due to change in struct Query.

Reported-by: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Author: Daniel Gustafsson <daniel(at)yesql(dot)se>
Reviewed-by: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Discussion: https://postgr.es/m/5243308F-8E5C-45AA-828C-FAD96C4F34DA@gmail.com
Backpatch-through: 19

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/372b8d1adb76740123791e9ded4f665b175f5bf5

Modified Files
--------------
doc/src/sgml/queries.sgml | 25 -------
doc/src/sgml/ref/select.sgml | 13 +---
doc/src/sgml/ref/select_into.sgml | 2 +-
src/backend/parser/analyze.c | 2 -
src/backend/parser/gram.y | 14 ----
src/backend/parser/parse_clause.c | 63 +---------------
src/backend/utils/adt/ruleutils.c | 4 +-
src/include/catalog/catversion.h | 2 +-
src/include/nodes/parsenodes.h | 2 -
src/include/parser/parse_clause.h | 1 -
src/test/regress/expected/aggregates.out | 123 -------------------------------
src/test/regress/sql/aggregates.sql | 54 --------------
12 files changed, 6 insertions(+), 299 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Melanie Plageman 2026-07-17 20:48:51 pgsql: Turn visibilitymap_clear() Assert back into an error
Previous Message Bruce Momjian 2026-07-17 19:57:18 pgsql: doc PG 19 relnote: move Oauth items