Passing "direct" args of ordered-set aggs to the transition function - Mailing list pgsql-hackers

From Florian Pflug
Subject Passing "direct" args of ordered-set aggs to the transition function
Date
Msg-id 41FAFDF8-39B2-4AEF-9FAC-5A317771912F@phlo.org
Whole thread Raw
Responses Re: Passing "direct" args of ordered-set aggs to the transition function  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi,

Is there a particular reason why the "direct" arguments of ordered-set
aggregates are not passed to the transition function too? It seems that
evaluating of some ordered-set aggregates would be much cheaper if we did
that.

For example, dense_rank() would then just need to count the number of rows
smaller than the hypothetical row, AFAICS.

Another example (that we don't currently provide, but still) would be a
histogram aggregate which receives an array of buckets as direct args and
returns a similarly shaped array of counters.

best regards,
Florian Pflug




pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: dynamic shared memory and locks
Next
From: Tom Lane
Date:
Subject: Re: Add %z support to elog/ereport?