pg.ddx.io pgsql-docs@postgresql.org mailing list archive
help / color / mirror / Atom feedTypo in 2.7 Aggregate Functions
2+ messages / 2 participants
[nested] [flat]
* Typo in 2.7 Aggregate Functions
@ 2023-01-16 15:50 PG Doc comments form <noreply@postgresql.org>
0 siblings, 1 reply; 2+ messages in thread
From: PG Doc comments form @ 2023-01-16 15:50 UTC (permalink / raw)
To: pgsql-docs@lists.postgresql.org; +Cc: jimmy.b.mau@gmail.com
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/15/tutorial-agg.html
Description:
Near the end of Chapter 2.7 Aggregate Functions of the documentation, the
command FILTER is introduced. The full query is
SELECT city, max(temp_lo), count(*) FILTER (WHERE temp_lo < 30)
FROM weather
GROUP BY city
HAVING max(temp_lo) < 40;
and the output shows a count value of 5. This is an error.
In total we only have 3 rows in the table so far. Furthermore, none of the
rows have temp_lo < 30. If I'm not mistaken, the count value should be 0.
Thanks,
Jimmy
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Typo in 2.7 Aggregate Functions
@ 2023-01-16 17:11 Tom Lane <tgl@sss.pgh.pa.us>
parent: PG Doc comments form <noreply@postgresql.org>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2023-01-16 17:11 UTC (permalink / raw)
To: jimmy.b.mau@gmail.com; +Cc: pgsql-docs@lists.postgresql.org
PG Doc comments form <noreply@postgresql.org> writes:
> Near the end of Chapter 2.7 Aggregate Functions of the documentation, the
> command FILTER is introduced. The full query is
> SELECT city, max(temp_lo), count(*) FILTER (WHERE temp_lo < 30)
> FROM weather
> GROUP BY city
> HAVING max(temp_lo) < 40;
> and the output shows a count value of 5. This is an error.
Yeah :-(. This is already fixed in our source tree [1], as you
can see on the website if you look at the "devel" branch. But the
released-version docs won't update till our next releases, in
February.
Thanks for the report, anyway!
regards, tom lane
[1] https://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=f05a5e0003edfec027ee10d09...
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2023-01-16 17:11 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-01-16 15:50 Typo in 2.7 Aggregate Functions PG Doc comments form <noreply@postgresql.org>
2023-01-16 17:11 ` Tom Lane <tgl@sss.pgh.pa.us>
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