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