pg.ddx.io pgsql-docs@postgresql.org mailing list archive
help / color / mirror / Atom feed[Minor] Clarification on "2.7. Aggregate Functions"
2+ messages / 2 participants
[nested] [flat]
* [Minor] Clarification on "2.7. Aggregate Functions"
@ 2026-09-28 17:51 PG Doc comments form <noreply@postgresql.org>
2026-09-29 12:47 ` Re: [Minor] Clarification on "2.7. Aggregate Functions" David Rowley <dgrowleyml@gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: PG Doc comments form @ 2026-09-28 17:51 UTC (permalink / raw)
To: pgsql-docs@lists.postgresql.org; +Cc: matematica.a3k@gmail.com
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/18/tutorial-agg.html
Description:
Where it says: "FILTER is much like WHERE, except that it removes rows only
from the input of the particular aggregate function that it is attached to.
Here, the count aggregate counts only rows with temp_lo below 45; but the
max aggregate is still applied to all rows, so it still finds the reading of
46."
Should say "FILTER is much like WHERE, except that it removes rows only from
the input of the particular aggregate function that it is attached to. Here,
the count aggregate counts only rows with temp_lo below 45; but the max
aggregate is still applied to all rows being considered with the GROUP BY
clause, so it still finds the reading of 46."
Wording may vary, I think a clarification on this should be an improvement.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [Minor] Clarification on "2.7. Aggregate Functions"
2026-09-28 17:51 [Minor] Clarification on "2.7. Aggregate Functions" PG Doc comments form <noreply@postgresql.org>
@ 2026-09-29 12:47 ` David Rowley <dgrowleyml@gmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: David Rowley @ 2026-09-29 12:47 UTC (permalink / raw)
To: matematica.a3k@gmail.com; pgsql-docs@lists.postgresql.org
On Tue, 29 Sept 2026 at 21:34, PG Doc comments form
<noreply@postgresql.org> wrote:
>
> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/18/tutorial-agg.html
> Description:
>
> Where it says: "FILTER is much like WHERE, except that it removes rows only
> from the input of the particular aggregate function that it is attached to.
> Here, the count aggregate counts only rows with temp_lo below 45; but the
> max aggregate is still applied to all rows, so it still finds the reading of
> 46."
> Should say "FILTER is much like WHERE, except that it removes rows only from
> the input of the particular aggregate function that it is attached to. Here,
> the count aggregate counts only rows with temp_lo below 45; but the max
> aggregate is still applied to all rows being considered with the GROUP BY
> clause, so it still finds the reading of 46."
>
> Wording may vary, I think a clarification on this should be an improvement.
i.e. you're suggesting that " being considered with the GROUP BY
clause," is added.
The GROUP BY clause only controls how input rows are grouped and has
no bearing on which rows are aggregated. So, IMO "being considered
with the GROUP BY clause" doesn't seem like an improvement.
I can't quite understand where the ambiguity is that you're trying to
fix. If the reader assumes "all rows" means all rows in the table, or
all rows visited during the execution of the query, they're correct as
the query has no WHERE clause and those two things are the same.
David
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2026-09-29 12:47 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-09-28 17:51 [Minor] Clarification on "2.7. Aggregate Functions" PG Doc comments form <noreply@postgresql.org>
2026-09-29 12:47 ` David Rowley <dgrowleyml@gmail.com>
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