Passing "direct" args of ordered-set aggs to the transition function

From: Florian Pflug <fgp(at)phlo(dot)org>
To: PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Passing "direct" args of ordered-set aggs to the transition function
Date: 2014-01-23 16:13:16
Message-ID: 41FAFDF8-39B2-4AEF-9FAC-5A317771912F@phlo.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-01-23 16:14:05 Re: Add %z support to elog/ereport?
Previous Message Robert Haas 2014-01-23 16:10:44 Re: dynamic shared memory and locks