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 1udxE2-002rfz-H5 for pgsql-hackers@arkaria.postgresql.org; Mon, 21 Jul 2025 20:35:07 +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 1udxE1-002vln-Br for pgsql-hackers@arkaria.postgresql.org; Mon, 21 Jul 2025 20:35:05 +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 1udxE1-002vlf-1O for pgsql-hackers@lists.postgresql.org; Mon, 21 Jul 2025 20:35:05 +0000 Received: from iguana.tulip.relay.mailchannels.net ([23.83.218.253]) by makus.postgresql.org with smtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1udxDy-0005BY-2T for pgsql-hackers@postgresql.org; Mon, 21 Jul 2025 20:35:04 +0000 X-Sender-Id: dreamhost|x-authsender|nico@cryptonector.com Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 9E0FF25A56; Mon, 21 Jul 2025 20:35:00 +0000 (UTC) Received: from pdx1-sub0-mail-a281.dreamhost.com (trex-blue-5.trex.outbound.svc.cluster.local [100.120.203.79]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 459F6259FB; Mon, 21 Jul 2025 20:35:00 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1753130100; a=rsa-sha256; cv=none; b=7rocPV0l8pUsa/r3GPAdS9dtzA0iLneemKd/yDjX2IcNCYTx6/S4ZcamoBTPK4bWORrhpt 9DlK+WvYaTYe6xab1IeQT33muqmrSReFvtgZy0hyQHD8+JLnpgB8kHNzq/K6udGqymgz+h 1Kp0e4lkHVUQihx02QEBPUIGmGTjeef1dmgbZlT6sgxaHKMR1PwcERJDTpam2/0Mv/e9J5 92N6gxfyVCysQTy6vA+0O1/yx8t/WxxJtp38SY2sLOWtBzW+is13L/GlxuazLLuu35INsg OBHVCO2lm3LLnKePUPzbtw2gNdj0UA82j+JNSxqQtQZMV2yjmho+t1xF3hdLvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1753130100; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=yr0CQ1HN95otih+jeLqjy734sE/wjtTI1G6df9xCT/Y=; b=WnkZs+wsFHf2di0gUmOXtxN6DzOZ3tz4u66Sx5Vk2fNSkddRE/D2jjrUa1Tdcl/TuIr4R/ k7hIQmhwewR6wq/bFTvEIeEaXIS2nv5DOf/QW9Rfj+XTSf1oA0Pt/IvmrLkzZt8+BzL+Rq +rOiBD4nNWJrBh4X1EwGmcuans09Hugvw1A6gxUAxKvD3B8XuGSEz9Fm6Wzt63NC3vrGmX zSAc+DwjzinfY93/Q2IvDX5350WE8RmR//4tlJB7nhB0e+wwzIxWAdVMIm05SqDMWkOKEV DF8bNHhQq1tAHdyhm1BEzr1AP8AtVAzgmkUrhG7OmjnuITy6VejQF3ryL2lFaw== ARC-Authentication-Results: i=1; rspamd-7d4d75f7cc-m8sc5; auth=pass smtp.auth=dreamhost smtp.mailfrom=nico@cryptonector.com X-Sender-Id: dreamhost|x-authsender|nico@cryptonector.com X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|nico@cryptonector.com X-MailChannels-Auth-Id: dreamhost X-Blushing-Daffy: 546222eb7a0e1f6c_1753130100546_741768691 X-MC-Loop-Signature: 1753130100546:568475831 X-MC-Ingress-Time: 1753130100546 Received: from pdx1-sub0-mail-a281.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.120.203.79 (trex/7.1.3); Mon, 21 Jul 2025 20:35:00 +0000 Received: from ubby (syn-075-081-095-064.res.spectrum.com [75.81.95.64]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nico@cryptonector.com) by pdx1-sub0-mail-a281.dreamhost.com (Postfix) with ESMTPSA id 4bmBwM0GgGz5j; Mon, 21 Jul 2025 13:34:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cryptonector.com; s=dreamhost; t=1753130099; bh=yr0CQ1HN95otih+jeLqjy734sE/wjtTI1G6df9xCT/Y=; h=Date:From:To:Cc:Subject:Content-Type:Content-Transfer-Encoding; b=LzZUxHSuTLqLuHVPb84j6jN9x/86A2CuoALLMPywwW6GzekqhH2aEaVE1Ut9NsO5m NgzsgY4Ocu0JK9AzEO3j3fBUDc3XTHfuklSYTG0YBXC+2VZ5QUHPhPUqzUtzDkgE9a L9xMkv2BLosepevR8vAUvagvyrN+6PZVbD7+TScsCWuL3tYwZ8BSUgIl42peuoGNPd 1CvJ9lhLi1RLdkyWsMHRHYX/WQKQ9miW8odUQ5ySLQEOITv2oU26yugoaeXou0iW4M ZWtRnoqIqPtYzmkJ/AuYu2Tud4DUuexsKv/impnOACvRRHcS+HmgzcCGes3RzBStbW 6/23KpFIBLCzA== Date: Mon, 21 Jul 2025 15:34:56 -0500 From: Nico Williams To: Vik Fearing Cc: Tom Lane , Matheus Alcantara , Isaac Morland , Mike Artz , Pg Hackers , Peter Eisentraut Subject: Re: Proposal: QUALIFY clause Message-ID: References: <463108.1753119052@sss.pgh.pa.us> <0b190baa-460d-48a8-9f7f-ca8c8cfe13bd@postgresfriends.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <0b190baa-460d-48a8-9f7f-ca8c8cfe13bd@postgresfriends.org> Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Jul 21, 2025 at 10:26:51PM +0200, Vik Fearing wrote: > On 21/07/2025 19:30, Tom Lane wrote: > > * I'm not exactly convinced that the committee would standardize > > it just like this. For one thing, QUALIFY is not even the right > > part of speech: it's a verb, and thus more fit to be a primary > > statement keyword. What you need here is an adverb (I think ... > > been a long time since high school English, but my dictionary > > says WHERE is an adverb). Maybe they'd be persuaded to do what > > the existing implementations did, but I wouldn't be at all surprised > > if they choose a different keyword. Or a gerund, which is what HAVING is. Or a conjugated verb or something like QUALIFIED BY, though really "qualif*" seems just wrong. This is just another name for a WHERE that, like HAVING is paired with some other language feature (like GROUP BY) and applies to that clause. I don't have a better keyword(s) to offer, just sadness. > I am pretty sure that the keyword will be QUALIFY. There are just too m= any > existing implementations for the standard to go against them all.=A0 (A= lso, > another rdbms just implemented it that way in their upcoming product.) Bummer.