From: Nico Williams <nico@cryptonector.com>
To: Vik Fearing <vik@postgresfriends.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Matheus Alcantara <matheusssilv97@gmail.com>
Cc: Isaac Morland <isaac.morland@gmail.com>
Cc: Mike Artz <michaeleartz@gmail.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Cc: Peter Eisentraut <peter@eisentraut.org>
Subject: Re: Proposal: QUALIFY clause
Date: Mon, 21 Jul 2025 15:34:56 -0500
Message-ID: <aH6kcNoIb0MKaoDM@ubby> (raw)
In-Reply-To: <0b190baa-460d-48a8-9f7f-ca8c8cfe13bd@postgresfriends.org>
References: <CAFY6G8euMWRjTEdRV9M=RL2_EJNDm5UNeHat9U1FGGwzfjGSfw@mail.gmail.com>
<CA+pG8ePeO1BBdu+fK4ZZiGSAj2PUsy_-ZL2jC61tF8Pym2BC_g@mail.gmail.com>
<CAMsGm5dAYswFz5RkgEu0ZsGbEJjHaJ3QMOMPYHAGUvY_V69rCg@mail.gmail.com>
<DBHTCY6HQ1KO.H54EA0FZ4XIN@gmail.com>
<463108.1753119052@sss.pgh.pa.us>
<0b190baa-460d-48a8-9f7f-ca8c8cfe13bd@postgresfriends.org>
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 many
> existing implementations for the standard to go against them all. (Also,
> another rdbms just implemented it that way in their upcoming product.)
Bummer.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: nico@cryptonector.com, vik@postgresfriends.org, tgl@sss.pgh.pa.us, matheusssilv97@gmail.com, isaac.morland@gmail.com, michaeleartz@gmail.com, peter@eisentraut.org
Subject: Re: Proposal: QUALIFY clause
In-Reply-To: <aH6kcNoIb0MKaoDM@ubby>
References: <CAFY6G8euMWRjTEdRV9M=RL2_EJNDm5UNeHat9U1FGGwzfjGSfw@mail.gmail.com> <CA+pG8ePeO1BBdu+fK4ZZiGSAj2PUsy_-ZL2jC61tF8Pym2BC_g@mail.gmail.com> <CAMsGm5dAYswFz5RkgEu0ZsGbEJjHaJ3QMOMPYHAGUvY_V69rCg@mail.gmail.com> <DBHTCY6HQ1KO.H54EA0FZ4XIN@gmail.com> <463108.1753119052@sss.pgh.pa.us> <0b190baa-460d-48a8-9f7f-ca8c8cfe13bd@postgresfriends.org> <aH6kcNoIb0MKaoDM@ubby>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox