agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Revert "Add GROUP BY ALL".
Date: Fri, 17 Jul 2026 20:14:33 +0000
Message-ID: <E1wkox6-000fl2-14@gemulon.postgresql.org> (raw)

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.evan.chao@gmail.com>
Author: Daniel Gustafsson <daniel@yesql.se>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/5243308F-8E5C-45AA-828C-FAD96C4F34DA@gmail.com
Backpatch-through: 19

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/a32733d8f10f0e35f7e4ee772ddbef552296577f

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(-)



view thread (2+ messages)  latest in thread

Message-ID: <E1wkox6-000fl2-14@gemulon.postgresql.org>
Permalink:  ../E1wkox6-000fl2-14@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1wkox6-000fl2-14@gemulon.postgresql.org

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Revert "Add GROUP BY ALL".
  In-Reply-To: <E1wkox6-000fl2-14@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox