Re: Aggregate function API versus grouping sets

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org, Atri Sharma <atri(dot)jiit(at)gmail(dot)com>
Subject: Re: Aggregate function API versus grouping sets
Date: 2014-07-02 20:15:58
Message-ID: 87a98rh69d.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>>>>> "Tom" == Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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 for fn_extra?

Tom> I think they're somewhat independent, and probably best patched
Tom> separately. In any case orderedsetagg.c's use of fn_extra is a
Tom> local matter that we'd not really have to fix in 9.4, except to
Tom> the extent that you think third-party code 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)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-07-02 20:17:13 Re: Can simplify 'limit 1' with slow function?
Previous Message Tom Lane 2014-07-02 20:03:25 Re: Aggregate function API versus grouping sets