From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Treat aggregate direct arguments as per-agg data not per-trans d |
Date: | 2017-10-16 20:02:59 |
Message-ID: | E1e4BbH-0003kW-4M@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2017-10-16 20:50:46 | pgsql: Exclude flex-generated code from coverage testing |
Previous Message | Tom Lane | 2017-10-16 19:51:28 | pgsql: Allow the built-in ordered-set aggregates to share transition st |