Re: Proposal: QUALIFY clause
От | Isaac Morland |
---|---|
Тема | Re: Proposal: QUALIFY clause |
Дата | |
Msg-id | CAMsGm5dAYswFz5RkgEu0ZsGbEJjHaJ3QMOMPYHAGUvY_V69rCg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Proposal: QUALIFY clause (Mike Artz <michaeleartz@gmail.com>) |
Ответы |
Re: Proposal: QUALIFY clause
Re: Proposal: QUALIFY clause |
Список | pgsql-hackers |
On Mon, 21 Jul 2025 at 10:19, Mike Artz <michaeleartz@gmail.com> wrote:
Many times I have thought it would be nice if there was a QUALIFY clause in Postgres!Just would like to add that including your list, Teradata, Redshift, SAP HANA, HP Vertica, and Trino all support the QUALIFY clause.Also it seems Postgres would be the first leading RDBMS - meaning like traditional, multipurpose RDMBS - to support QUALIFY, which would be pretty cool.
Is this different from using the window functions in a subquery and then applying a WHERE clause on the outer query?
SELECT … FROM (SELECT … [including window functions] FROM …) WHERE [stuff that would be in QUALIFY]
I'll be honest, I'm skeptical that we need another keyword that basically means “WHERE, but applied at a different point in the query processing”. I'm not even convinced that HAVING was a good idea (although obviously I would not propose removal).
В списке pgsql-hackers по дате отправления: