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 1ueEqz-006l2P-QG for pgsql-hackers@arkaria.postgresql.org; Tue, 22 Jul 2025 15:24:30 +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 1ueEqy-009MaD-W0 for pgsql-hackers@arkaria.postgresql.org; Tue, 22 Jul 2025 15:24:29 +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 1ueEqy-009Ma4-M8 for pgsql-hackers@lists.postgresql.org; Tue, 22 Jul 2025 15:24:28 +0000 Received: from relay2-d.mail.gandi.net ([2001:4b98:dc4:8::222]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1ueEqv-000FSe-1O for pgsql-hackers@postgresql.org; Tue, 22 Jul 2025 15:24:28 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id B61F4441D6; Tue, 22 Jul 2025 15:24:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=postgresfriends.org; s=gm1; t=1753197865; 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: in-reply-to:in-reply-to:references:references; bh=RLsZkZCn5XJx16szeR+HuD7K9hexfe7a5IW+kcXU3kM=; b=SeFzjZpaT9jw67wXauFFCcfrtYsM8h1UKBgKywPJXqiz89H6Ja7fh3bllAo/aX4kqO/jXD 2D3Aw6ZmaIE+J0DnPnuElk5X7fmK0P47x7xs+dFuO73v8GbWGTO/lICHUuI1Fuzet9arUK KmQLH5Rboe9pN1QJ4s0puB1wTuDQROvr1vU5imE/ttOXmx50JM0tjGQ/wgJUSIsq6LaCMF YM8ppCnc662T1KLscB8fBOsOQU9EirSoJU3L/20TULNl7Lhd3kH+cAYAcfRwGEYYm1dAoX VxZlQ7Vi44RmYhvVlDVTfZtBINnVVr7P7BJSD6orU5T6eL0eRfMDSEYEKdnboA== Content-Type: multipart/alternative; boundary="------------3M44XH875lM0D3xSBt6tXc5K" Message-ID: <737a77a2-83eb-4b97-a109-e58d3ce1189a@postgresfriends.org> Date: Tue, 22 Jul 2025 17:24:24 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Proposal: QUALIFY clause To: Nico Williams , Merlin Moncure Cc: Pavel Stehule , Matheus Alcantara , Pg Hackers , Peter Eisentraut References: <6c998e4f-f6f2-43c2-8b67-cfff360ef241@postgresfriends.org> Content-Language: en-US From: Vik Fearing In-Reply-To: X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdejhedvhecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurheptgfkffggfgfuvfevfhfhjgesrgdtreertddvjeenucfhrhhomhepgghikhcuhfgvrghrihhnghcuoehvihhksehpohhsthhgrhgvshhfrhhivghnughsrdhorhhgqeenucggtffrrghtthgvrhhnpefgjeefudffffeljeeutdejffffteejuefhteekheehkedtjeektdegjeeggffhtdenucfkphepvdgrtddvmeekgedvkeemudduvgdtmedvjedtudemrgegvgdumeegvdhfgeemrgelrgekmeekvgeikeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvrgdtvdemkeegvdekmeduudgvtdemvdejtddumegrgegvudemgedvfhegmegrlegrkeemkegvieekpdhhvghloheplgfkrfggieemvdgrtddvmeekgedvkeemudduvgdtmedvjedtudemrgegvgdumeegvdhfgeemrgelrgekmeekvgeikegnpdhmrghilhhfrhhomhepvhhikhesphhoshhtghhrvghsfhhrihgvnhgushdrohhrghdpnhgspghrtghpthhtohepiedprhgtphhtthhopehnihgtohestghrhihpthhonhgvtghtohhrrdgtohhmpdhrtghpthhtohepmhhmohhntghurhgvsehgmhgrihhlrdgtohhmpdhrtghpthhtohepphgrvhgvlhdrs hhtvghhuhhlvgesghhmrghilhdrtghomhdprhgtphhtthhopehmrghthhgvuhhsshhsihhlvheljeesghhmrghilhdrtghomhdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrhhssehpohhsthhgrhgvshhqlhdrohhrghdprhgtphhtthhopehpvghtvghrsegvihhsvghnthhrrghuthdrohhrgh X-GND-Sasl: vik@postgresfriends.org List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------3M44XH875lM0D3xSBt6tXc5K Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 22/07/2025 17:14, Nico Williams wrote: > It doesn't seem too crazy that extra WHEREs in WHERE clauses should some > day function as ANDs, and ditto HAVINGs, which is another reason not to > reuse HAVING for this: just to leave that a possibility, remote though > it might be. I have a firm finger on the pulse of the standards committee, and I can guarantee that multiple WHERE clauses will never replace AND until certain people cross the river Styx.  Myself included. > My advice is to wait till QUALIFY is standardized, then hold your nose > and adopt it, or maybe sooner when it becomes clear that it will be > standardized (because so many other RDBMSes have it too). Good advice. -- Vik Fearing --------------3M44XH875lM0D3xSBt6tXc5K Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit


On 22/07/2025 17:14, Nico Williams wrote:
It doesn't seem too crazy that extra WHEREs in WHERE clauses should some
day function as ANDs, and ditto HAVINGs, which is another reason not to
reuse HAVING for this: just to leave that a possibility, remote though
it might be.


I have a firm finger on the pulse of the standards committee, and I can guarantee that multiple WHERE clauses will never replace AND until certain people cross the river Styx.  Myself included.


My advice is to wait till QUALIFY is standardized, then hold your nose
and adopt it, or maybe sooner when it becomes clear that it will be
standardized (because so many other RDBMSes have it too).


Good advice.

-- 

Vik Fearing

--------------3M44XH875lM0D3xSBt6tXc5K--