Re: Partial Mode in Aggregate Functions - Mailing list pgsql-hackers

From Marcos Pegoraro
Subject Re: Partial Mode in Aggregate Functions
Date
Msg-id CAB-JLwbdjKixuTwCx=VDX9qGiaGHO2cnSrxF6gMo8ji4cRY2yA@mail.gmail.com
Whole thread Raw
In response to Partial Mode in Aggregate Functions  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: Partial Mode in Aggregate Functions
List pgsql-hackers
Em sáb., 21 de fev. de 2026 às 12:01, David G. Johnston <david.g.johnston@gmail.com> escreveu:
Yes, see create aggregate for what is required when setting partial aggregation to true.  The explanation on [0] (aggregate function reference page) regarding why json creation functions show false is also informative.
Okay, looking at the documentation in depth, it's possible to understand that. The problem is, for a user who only reads this page, and often only the table titled "Partial Mode", what do you want them to understand ? 
I think it's more reasonable for him to think that Partial refers to filtered data rather than imagining that it is data processed in parallel.
 
We already cross-reference to the authoritative sections for this.  Could entertain a rephrasing of those cross-references but I would not go and make a big thing of it here.  That said, maybe a separate “since all aggregates accept a filter clause its syntax has been o tied here for brevity” sentence would work and match up with the existing one for order by.
 
Why not an introduction for aggregate functions describing not only FILTER but ORDER BY and DISTINCT too ?
agg_function([ DISTINCT ] expression [ , ... ] [ ORDER BY order_by_clause ]) [ FILTER ( WHERE filter_clause ) ])

regards
Marcos

pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Non-text mode for pg_dumpall
Next
From: "David G. Johnston"
Date:
Subject: Re: Partial Mode in Aggregate Functions