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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Florian Pflug <fgp(at)phlo(dot)org>
Cc: PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Passing "direct" args of ordered-set aggs to the transition function
Date: 2014-01-23 16:20:21
Message-ID: 13619.1390494021@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Florian Pflug <fgp(at)phlo(dot)org> writes:
> Is there a particular reason why the "direct" arguments of ordered-set
> aggregates are not passed to the transition function too?

Because they have to be evaluated only once.

I did consider evaluating them once at the start and saving the values,
but that's a bit problematic from a memory management standpoint.

Still, if you have a good solution to that and the cycles to produce a
patch, it's not too late to reconsider. I concur that it's not that
hard to think of cases where it'd be useful.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2014-01-23 16:22:18 Re: GIN improvements part2: fast scan
Previous Message Andres Freund 2014-01-23 16:17:47 Re: Add %z support to elog/ereport?