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 1sWLiO-00EcsF-8s for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Jul 2024 20:02:28 +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 1sWLiM-00FtAH-84 for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Jul 2024 20:02:26 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sWLiL-00FtA9-UO for pgsql-hackers@lists.postgresql.org; Tue, 23 Jul 2024 20:02:26 +0000 Received: from fhigh1-smtp.messagingengine.com ([103.168.172.152]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sWLiJ-0015P1-7m for pgsql-hackers@postgresql.org; Tue, 23 Jul 2024 20:02:25 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfhigh.nyi.internal (Postfix) with ESMTP id D70B411400E6; Tue, 23 Jul 2024 16:02:21 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Tue, 23 Jul 2024 16:02:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm2; t=1721764941; x=1721851341; bh=l/lemVKs2+DzSOVZ+c3tzisZ0aIyqBoZ x46y3MjgtR0=; b=aZlYblzkSGPGgI2/tzgj4kZ/aQoJFvoiGT3XXLBsYAn6wcre ILyPbYzulfWPBeFk2Wfntv8vfC5GGDVGTWT3XqmEJUpCEQ8w7OhlQ0kfb2S9mttL SYWtlfgLBXj1qEfvxXZHjg258HuAVpw7FuKQ6bU0v9V1UgvgCtBRcxPcjxxlwXFl JYy064/l7hs+QM+qoyaRFRjonJEXVJ2jUKYu3tG1u7aPykEUn9z876UZqRtG+rrz fM/bH107BBjPm9G0U7ykL/A4RV0K3EUDDFP6lEVvQ50wUZaKRF2dpMIclQvjksm1 Xibsx5MPTsS2noXNbGxzZWf4b+Kb/Qh0diN0wg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1721764941; x= 1721851341; bh=l/lemVKs2+DzSOVZ+c3tzisZ0aIyqBoZx46y3MjgtR0=; b=o uBCodZTySJSmIyg5oe2FGCeXi6IOukByk+ZZwglUSgPCD8AZ6cvCrTvvlc+FgYvx tcPO7KPPcUa0KvAz7qIndi2hdcz1H00a/uYooORXqTrb4NANMZvbpDqH+TfAWWnJ ng2nxqNxnMAyhOL1vbYs4bDZc+J9YjHUmV78fuuXwPWXmqAhJECcMRTVs1dWKyM+ OHzIoA0oJuoEYUwtpnBxMX+3j1G4orp7y08ap4vIu2uobVeAhB204OXR0nMHPqz4 PvfEIvSG4XUYi1BFH544GnXigTaoJRId5ADeZbFKj9aGUL89qJGgW50r9krcGjmB 4fYLvFQ5XPM80HQKEoKAw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrheelgddugeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrsegvihhsvghnthhrrghuthdrohhrgh eqnecuggftrfgrthhtvghrnhepjeekieffudfgheehvdfhgefgiefhvdffgffggfevtefh teehveffgfdtvdeuveeinecuffhomhgrihhnpeguuhgtkhgusgdrohhrghdpuggrthgrsg hrihgtkhhsrdgtohhmpdhsnhhofihflhgrkhgvrdgtohhmnecuvehluhhsthgvrhfuihii vgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhesvghishgvnhhtrhgruh htrdhorhhgpdhnsggprhgtphhtthhopedt X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 23 Jul 2024 16:02:19 -0400 (EDT) Message-ID: Date: Tue, 23 Jul 2024 22:02:15 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] GROUP BY ALL To: Tom Lane , "David G. Johnston" Cc: David Christensen , pgsql-hackers References: <931747.1721687375@sss.pgh.pa.us> Content-Language: en-US From: Peter Eisentraut In-Reply-To: <931747.1721687375@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 23.07.24 00:29, Tom Lane wrote: > (Personally, I'd wonder exactly what ALL is quantified over: the > whole output of the FROM clause, or only columns mentioned in the > SELECT tlist, or what? And why that choice rather than another?) Looks like the main existing implementations take it to mean all entries in the SELECT list that are not aggregate functions. https://duckdb.org/docs/sql/query_syntax/groupby.html#group-by-all https://docs.databricks.com/en/sql/language-manual/sql-ref-syntax-qry-select-groupby.html#parameters https://docs.snowflake.com/en/sql-reference/constructs/group-by#parameters