Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p77nE-0003xA-BA for pgsql-hackers@arkaria.postgresql.org; Mon, 19 Dec 2022 04:30:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1p77nC-0007uF-OQ for pgsql-hackers@arkaria.postgresql.org; Mon, 19 Dec 2022 04:30:22 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p77nC-0007u5-FP for pgsql-hackers@lists.postgresql.org; Mon, 19 Dec 2022 04:30:22 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p77n6-00021I-3x for pgsql-hackers@postgresql.org; Mon, 19 Dec 2022 04:30:21 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 2BJ4UExN835591; Sun, 18 Dec 2022 23:30:14 -0500 From: Tom Lane To: Andrey Borodin cc: pgsql-hackers Subject: Re: GROUP BY ALL In-reply-to: References: Comments: In-reply-to Andrey Borodin message dated "Sun, 18 Dec 2022 20:19:10 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <835589.1671424214.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 18 Dec 2022 23:30:14 -0500 Message-ID: <835590.1671424214@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andrey Borodin writes: > I saw a thread in a social network[0] about GROUP BY ALL. The idea seems= useful. Isn't that just a nonstandard spelling of SELECT DISTINCT? What would happen if there are aggregate functions in the tlist? I'm not especially on board with "ALL" meaning "ALL (oh, but not aggregates)". regards, tom lane