Re: Aggregate function API versus grouping sets - Mailing list pgsql-hackers

From Andrew Gierth
Subject Re: Aggregate function API versus grouping sets
Date
Msg-id 87a98rh69d.fsf@news-spur.riddles.org.uk
Whole thread Raw
In response to Re: Aggregate function API versus grouping sets  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Aggregate function API versus grouping sets  (Vik Fearing <vik.fearing@dalibo.com>)
List pgsql-hackers
>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:
>> Do we want a decision on the fn_extra matter first, or shall I do>> one patch for the econtext, and a following one
forfn_extra?
 
Tom> I think they're somewhat independent, and probably best patchedTom> separately.  In any case orderedsetagg.c's use
offn_extra is aTom> local matter that we'd not really have to fix in 9.4, except toTom> the extent that you think
third-partycode might copy it.
 

Given that there's been no attempt to expose ordered_set_startup /
ordered_set_transition* as some sort of API, I think it's virtually
inevitable that people will cargo-cult all of that code into any new
ordered set aggregate they might wish to create.

(Had one request so far for a mode() variant that returns the unique
modal value if one exists, otherwise null; so the current set of
ordered-set aggs by no means exhausts the possible applications.)

-- 
Andrew (irc:RhodiumToad)



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Aggregate function API versus grouping sets
Next
From: Tom Lane
Date:
Subject: Re: Can simplify 'limit 1' with slow function?