Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1x1mil-005PoQ-1E for pgsql-docs@arkaria.postgresql.org; Wed, 02 Sep 2026 15:17:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1x1mik-00D2qV-1G for pgsql-docs@arkaria.postgresql.org; Wed, 02 Sep 2026 15:17:50 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wzb4M-002ToV-17 for pgsql-docs@lists.postgresql.org; Thu, 27 Aug 2026 14:27:06 +0000 Received: from mahout.postgresql.org ([2001:4800:3e1:1::227]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wzb4K-00000002hAD-2tLu for pgsql-docs@lists.postgresql.org; Thu, 27 Aug 2026 14:27:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=postgresql.org; s=20171124; h=Message-ID:Date:Reply-To:Cc:From:To:Subject: Content-Transfer-Encoding:MIME-Version:Content-Type:Sender:Content-ID: Content-Description:In-Reply-To:References; bh=OZQV1Qf39J7PkF6FFtOtaK9lHyY0V2W38TRMPiEmNm4=; b=fZN4WONrlzD/j6z2WgP9WwOUyT 6GI0cjhdqzcbU8okgIsC7i5/btD0v0TVjEgES08UIlk2PbczvWHteC6fhJCCSDzSEp+3Cqd9Lj5YS 9cVgPhzNTK24QAn3V+xyUn06TUG1flDrnOXltPHRQEhiqpuwICadE8f78FevmlTpTPX2Hx2Jm8ACB 66Yy7xqBH+Sr96yvjF/ZU5lO0j50YKEXD8PnPPcoagDt9Cs27hkD7ivgVVXRDsCdfhH3h13j0r8oZ ZILCecfQv9zqfbAKGfMqI0NJ7aqmshXW+k0IynrvRudzXKddYlBpnzGYm5P5i8rFcHUDkxK+nk4O0 l1s/7TzQ==; Received: from wrigleys.postgresql.org ([2a02:16a8:dc51::60]) by mahout.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wzb4K-008AWx-1J for pgsql-docs@lists.postgresql.org; Thu, 27 Aug 2026 14:27:04 +0000 Received: from localhost ([127.0.0.1] helo=wrigleys.postgresql.org) by wrigleys.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1wzb4I-00000004WI7-40D7 for pgsql-docs@lists.postgresql.org; Thu, 27 Aug 2026 14:27:02 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: 4.2.7. Aggregate Expressions To: pgsql-docs@lists.postgresql.org From: PG Doc comments form Cc: y.saburov@gmail.com Reply-To: y.saburov@gmail.com, pgsql-docs@lists.postgresql.org Date: Thu, 27 Aug 2026 14:26:46 +0000 Message-ID: <178784080621.1060526.4544192651418189612@wrigleys.postgresql.org> X-Auto-Response-Suppress: All Auto-Submitted: auto-generated List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/18/sql-expressions.html Description: Can you add a code block with an example? Perhaps something like this: ```psql db=3D# WITH vals (f1) AS ( VALUES (1),(3),(4),(3),(2),(null) ) SELECT count(*), count(f1), COUNT(DISTINCT f1) FROM vals; count | count | count -------+-------+------- 6 | 5 | 4 (1 row) ``` After: >> For example, count(*) returns the total number of input rows; count(f1) returns the number of input rows in which f1 is not null, since count ignores null values; and count(distinct f1) returns the number of distinct non-null values of f1. We haven=E2=80=99t seen the term =E2=80=9Cf1=E2=80=9D before=E2=80=94and th= e paragraph doesn=E2=80=99t specify that this is a field.