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

From Tom Lane
Subject Re: Passing "direct" args of ordered-set aggs to the transition function
Date
Msg-id 13619.1390494021@sss.pgh.pa.us
Whole thread Raw
In response to Passing "direct" args of ordered-set aggs to the transition function  (Florian Pflug <fgp@phlo.org>)
Responses Re: Passing "direct" args of ordered-set aggs to the transition function  (Florian Pflug <fgp@phlo.org>)
List pgsql-hackers
Florian Pflug <fgp@phlo.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



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Add %z support to elog/ereport?
Next
From: Heikki Linnakangas
Date:
Subject: Re: GIN improvements part2: fast scan