Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pHT1h-0007QL-6N for pgsql-docs@arkaria.postgresql.org; Mon, 16 Jan 2023 17:12:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pHT1f-0003U1-7H for pgsql-docs@arkaria.postgresql.org; Mon, 16 Jan 2023 17:12:03 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pHT1f-0003Ts-06 for pgsql-docs@lists.postgresql.org; Mon, 16 Jan 2023 17:12:03 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pHT1c-0001jb-H1 for pgsql-docs@lists.postgresql.org; Mon, 16 Jan 2023 17:12:02 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 30GHBwii1890614; Mon, 16 Jan 2023 12:11:58 -0500 From: Tom Lane To: jimmy.b.mau@gmail.com cc: pgsql-docs@lists.postgresql.org Subject: Re: Typo in 2.7 Aggregate Functions In-reply-to: <167388420869.2667301.17238386924074832449@wrigleys.postgresql.org> References: <167388420869.2667301.17238386924074832449@wrigleys.postgresql.org> Comments: In-reply-to PG Doc comments form message dated "Mon, 16 Jan 2023 15:50:08 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1890612.1673889118.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 16 Jan 2023 12:11:58 -0500 Message-ID: <1890613.1673889118@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Doc comments form writes: > Near the end of Chapter 2.7 Aggregate Functions of the documentation, th= e > 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=3Dpostgresql.git&a=3Dcommitdiff&h= =3Df05a5e0003edfec027ee10d09082667036862e1c