4.2.7. Aggregate Expressions
Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.
You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:
docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t253648psql -h localhost -U postgresBuilt from patchset v2 (message #2), September 19, 2026 at 09:41 PM.
Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:
git clone --branch t253648_2 https://github.com/hackorum-dev/postgres.gitIn a checkout you already have, add the fork once:
git remote add hackorum https://github.com/hackorum-dev/postgres.gitthen, for this patchset and every later one:
git fetch hackorum t253648_2 && git checkout t253648_2Patchset v2 (message #2) is on t253648_2
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=# 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’t seen the term “f1” before—and the paragraph doesn’t specify that
this is a field.
On Thu, Aug 27, 2026 at 02:26:46PM +0000, PG Doc comments form wrote:
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=# 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.
I see your point that this could be clearer. How is this patch?
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EDB https://enterprisedb.com
Do not let urgent matters crowd out time for investment in the future.