Re: A couple questions about ordered-set aggregates - Mailing list pgsql-hackers

From Tomas Vondra
Subject Re: A couple questions about ordered-set aggregates
Date
Msg-id 20201030234948.kawgciecx4hyyud4@development
Whole thread Raw
In response to A couple questions about ordered-set aggregates  (Chapman Flack <chap@anastigmatix.net>)
List pgsql-hackers
On Sun, Oct 25, 2020 at 09:32:22PM -0400, Chapman Flack wrote:
>I find I am allowed to create an ordered-set aggregate with a non-empty
>direct argument list and no finisher function. Am I right in thinking
>that's kind of nonsensical, as nothing will ever look at the direct args?
>
>Also, the syntax summary shows PARALLEL = { SAFE | RESTRICTED | UNSAFE }
>in the ordered-set syntax variant, since 9.6, though that variant
>accepts no combine/serial/deserial functions, and there's also
>a note saying "Partial (including parallel) aggregation is currently
>not supported for ordered-set aggregates."
>
>Does PARALLEL = { SAFE | RESTRICTED | UNSAFE } on an ordered-set
>aggregate affect anything?
>

I may be missing something, but I believe PARALLEL = SAFE simply means
it can be executed in the parallel part of the plan. That does not
require support for partial aggregation - we simply don't support
passing partial results to the leader, hence combine/serial/deserial
functions are not needed.

Not sure about the direct arguments.

regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services 



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: Should the function get_variable_numdistinct consider the case when stanullfrac is 1.0?
Next
From: Tom Lane
Date:
Subject: Re: Should the function get_variable_numdistinct consider the case when stanullfrac is 1.0?