[COMMITTERS] pgsql: Treat aggregate direct arguments as per-agg data not per-transd - Mailing list pgsql-committers

From Tom Lane
Subject [COMMITTERS] pgsql: Treat aggregate direct arguments as per-agg data not per-transd
Date
Msg-id E1e4BbH-0003kW-4M@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Treat aggregate direct arguments as per-agg data not per-trans data.

There is no reason to insist that direct arguments must match before
we can merge transition states of two aggregate calls.  They're only
used during the finalfn call, so we can treat them as like the finalfn
itself.  This allows, eg, merging of

select percentile_cont(0.25) within group (order by a), percentile_disc(0.5) within group (order by a)
from ...

This didn't matter (and could not have been tested) before we allowed
state merging of OSAs otherwise.

Discussion: https://postgr.es/m/CAB4ELO5RZhOamuT9Xsf72ozbenDLLXZKSk07FiSVsuJNZB861A@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/cf5ba7c30c0428f5ff49197ec1e0f052035300d6

Modified Files
--------------
src/backend/executor/nodeAgg.c | 27 ++++++++++-----------------
1 file changed, 10 insertions(+), 17 deletions(-)


--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: [COMMITTERS] pgsql: Allow the built-in ordered-set aggregates to share transitionst
Next
From: Peter Eisentraut
Date:
Subject: [COMMITTERS] pgsql: Exclude flex-generated code from coverage testing