Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1v3NZx-00FI92-8I for pgsql-hackers@arkaria.postgresql.org; Mon, 29 Sep 2025 23:46:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1v3NZv-004l9Y-3O for pgsql-hackers@arkaria.postgresql.org; Mon, 29 Sep 2025 23:46:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1v3NZu-004l9P-Ls for pgsql-hackers@lists.postgresql.org; Mon, 29 Sep 2025 23:46:47 +0000 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1v3NZs-000nPw-2S for pgsql-hackers@postgresql.org; Mon, 29 Sep 2025 23:46:47 +0000 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-26d0fbe238bso40878445ad.3 for ; Mon, 29 Sep 2025 16:46:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759189602; x=1759794402; darn=postgresql.org; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=JtaBL4yEagykC176mAHieCxcP69/9DfkiPEdNVQw4dA=; b=EgwZ1hDWU5le+zzfwp7EkQ96mNl0BUBtPj9Zrvi1wZoWiT8YDBYSKI4RUbTsxk8TwE x0e7d7aHA8uSbU2rS/+AiOE+bC1XLYf1NRw4PYmbQhrde5q0YwnHFC+npxpOb8UMj8SF n1MszSWsTReoHY53LzQVIrDYFE9YmSUrO0GaHvPzxrrb8iF9hQBNxvBzNdJXHIvc7emU ObfdFM1Us48gvtWMI/qz2YFARi9gyDOJF8WyC4xKNVjwjY9ajzw6OjP/oJwbYk1zkqo/ IGt8ehn/iDhFSGO9p5wkgB7RAh63gNnw6Cwh+8Gt9Ev0ye0xkoHp7mDL5O6XV0eIn2Ed joyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759189602; x=1759794402; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=JtaBL4yEagykC176mAHieCxcP69/9DfkiPEdNVQw4dA=; b=JfuRrMfbvWSlsK2Er9gCSN28dMCRh1ZQfFJsf3ArLIVBIuhlNFv54hMmQuC4bhbo8t 5A7+7uYfpsRWDZpclL22YCYK2xL4UX/azDVOPAVf6u71sq937WQbv0onWBNU5FAoShFF zLrB8qo+oogEm6yH9I6Y6Hm2EIZOxY///PGhIcfeOWbmFmoeXExGDSnmDXkzh9Y8o4e8 Buh+A4skjU9CXVKZAiXMYSggkbl4ouCsniauoRgo8QCAYwVxOnDbM9oEl+xKfJeiXQmk QHvEOIZiM4qOUCItnvPIUN9guAZCSwBPsyo2VnzkrQKXEEIZDbIgbddJrPnXx35b74Jy h9UQ== X-Forwarded-Encrypted: i=1; AJvYcCUt42rc50JSHq4TfCz0Oymx6qg2qpVcZ3P+yS3DA3GPdnlq2asO2XgqDDyrpxWJj4z/E3vFVJ9nc8yC6LDZ@postgresql.org X-Gm-Message-State: AOJu0Yz56ODpo3mMEk53RJ3N+YQULdBPCjvqGKahsfBnJLsv9saUObRP pZHNgeo7qD5/GcffwcSPghZeChfAkcXNtf4x4zN4XgIq4LiWts9bwTrH X-Gm-Gg: ASbGnctlpTVYij/U+O1YISWSY3IFrEwRW0XJMNPKbNDVeIHeHE/+xshLdNna7ys51Vj pY7jqPH+omSzsWAdc7LTYxjJjTB22huXNjUrBIWm0Txb+zjxSdgVcDW/tJUoI7eZMkJlYkGj06i jiH0aPme64YMrFgwiOKTiiKpskV8DSXzReFRpwTYb5i2VKq8XP6n1gX8Dwz8oTQXMJ+XFl6/Hnj 3qf5UozrZzRQSlHEbENkgejaZGv9xDAEH4WEdu87pJT6brvJkh24rQkGLcZrp04+WXHQLug9fYE h4OlAYKsxoCxMMMRLtlMEoY6G8KIzimU0284y1m9+mvFZYiN9iVIDrCkKSK00tDxIZu+G2IOhbk 2xwGWLyoRG9u2V9D/KWc7c9PKzy6fPWIW4u9sEAtYqbbHRbtMJc+js5aCuoWdeiMWgJ10 X-Google-Smtp-Source: AGHT+IGJc9Ec7gyb2dOHH2X2KLxKpzkNoCdOM9UNRzfslzRYKBKQQoo5supraLD/SLWqE5QhuddSkg== X-Received: by 2002:a17:903:acf:b0:274:5030:2906 with SMTP id d9443c01a7336-27ed4ab8df8mr204507865ad.46.1759189602040; Mon, 29 Sep 2025 16:46:42 -0700 (PDT) Received: from smtpclient.apple ([170.178.170.211]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-27ed66d6523sm142512315ad.11.2025.09.29.16.46.39 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Sep 2025 16:46:41 -0700 (PDT) From: Chao Li Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_3EBE509A-7BF7-4905-BCF9-08B8AE18D0D4" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81\)) Subject: Re: [PATCH] GROUP BY ALL Date: Tue, 30 Sep 2025 07:46:25 +0800 In-Reply-To: Cc: Tom Lane , Peter Eisentraut , Andrey Borodin , pgsql-hackers , "David G. Johnston" , Jelte Fennema-Nio To: David Christensen References: <4D2047B0-E8D8-472B-B7E8-61206B1E6AFA@yandex-team.ru> <4083063.1758902694@sss.pgh.pa.us> <4085064.1758903815@sss.pgh.pa.us> <167505.1758988990@sss.pgh.pa.us> <702762.1759011796@sss.pgh.pa.us> X-Mailer: Apple Mail (2.3826.700.81) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail=_3EBE509A-7BF7-4905-BCF9-08B8AE18D0D4 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Sep 29, 2025, at 04:34, David Christensen wrote: >=20 > On Sun, Sep 28, 2025 at 2:18=E2=80=AFPM David Christensen = > wrote: >>=20 >> On Sat, Sep 27, 2025 at 5:23=E2=80=AFPM Tom Lane = wrote: >>>=20 >>> Here's a v6 that's rebased up to HEAD and contains fixes for the >>> semantic issues we discussed. It still lacks documentation, but >>> otherwise I think it's about ready to go. >>=20 >> Here is v7 with a stab at docs; fairly minimal at this point, but >> touching the two areas that are likely to need adjusting. When >> adjusting the docs for sql-select, I noticed that the grammar also >> supports `GROUP BY ALL `, so I also added a test = to >> ensure that this syntax is explicitly supported. (It seems like it >> works as-is without further grammar adjustments, but I was a little >> worried when I first saw that fact... :D) Not sure that >> aggregates.sql is still the right place for all of these bits, but it >> does seem like having all things `GROUP BY ALL`-related tested in the >> same place is a nice property, so leaving there for now. >=20 > This time with attachment! > A nit comment for the doc: ``` + not contain either an aggregate function or a window function in = their + expression list. This can greatly simplify ad-hoc exploration of = data. + ``` =E2=80=9CIn their expression list=E2=80=9D =3D> =E2=80=9Cin the = SELECT list" Best regards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/ --Apple-Mail=_3EBE509A-7BF7-4905-BCF9-08B8AE18D0D4 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On Sep 29, 2025, at 04:34, David Christensen = <david@pgguru.net> wrote:

On Sun, Sep 28, 2025 at 2:18=E2=80=AFPM = David Christensen <david@pgguru.net> wrote:

On Sat, Sep 27, 2025 at 5:23=E2=80=AFPM Tom = Lane <tgl@sss.pgh.pa.us> wrote:

Here's a v6 that's rebased up to HEAD and contains = fixes for the
semantic issues we discussed.  It still lacks = documentation, but
otherwise I think it's about ready to = go.

Here is v7 with a stab at docs; fairly minimal = at this point, but
touching the two areas that are likely to need = adjusting.  When
adjusting the docs for sql-select, I noticed = that the grammar also
supports `GROUP BY ALL = <grouping_elements>`, so I also added a test to
ensure that = this syntax is explicitly supported. (It seems like it
works as-is = without further grammar adjustments, but I was a little
worried when = I first saw that fact... :D)  Not sure that
aggregates.sql is = still the right place for all of these bits, but it
does seem like = having all things `GROUP BY ALL`-related tested in the
same place is = a nice property, so leaving there for now.

This time with attachment!
<v7-0001-Add-GROUP-BY-ALL.patch>
=

A nit comment for the = doc:

```
+    not = contain either an aggregate function or a window function in = their
+    expression list.  This can greatly = simplify ad-hoc exploration of data.
+   = </para>
```

=E2=80=9CIn = their expression list=E2=80=9D =3D> =E2=80=9Cin = the <literal>SELECT</literal> = list"

Best regards,
--
Chao Li (Evan)
HighGo Software = Co., Ltd.
https://www.highgo.com/




= --Apple-Mail=_3EBE509A-7BF7-4905-BCF9-08B8AE18D0D4--