My understanding reading [0] was that Partial Mode would be related to
FILTER (WHERE ...). And I'm not alone thinking that, see [1], Hans calls
Partial Aggregation.

Then I see that jsonb_agg does not have Partial Mode, but testing, it works
select jsonb_agg(V) filter (where V>1) from (Values(1),(2)) x(V)

Then reading more carefully on the header of this page says
Aggregate functions that support Partial Mode are eligible to participate
in various optimizations, such as parallel aggregation.

But what does Partial Mode mean to the user ? Is it related only to
parallel or any other optimization ? And all aggregate functions can have
FILTER ?
I'm not exactly sure how to explain this case better, but I think it needs
better wording.

Additionally, on this page there is no mention to FILTER (WHERE ...).
Wouldn't it be better to explain something like it is on [2].

[0] - https://www.postgresql.org/docs/current/functions-aggregate.html
[1] -
https://www.cybertec-postgresql.com/en/partial-aggregation-the-beautiful-way/
[2] - https://www.postgresql.org/docs/current/tutorial-agg.html

regards
Marcos

Reply via email to