Re: Idea for aggregates

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Stark <stark(at)mit(dot)edu>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Idea for aggregates
Date: 2014-04-04 22:47:57
Message-ID: 10310.1396651677@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greg Stark <stark(at)mit(dot)edu> writes:
> The basic idea is to separate the all the properties of the aggregate
> functions except the final function from the final function into a
> separate object. Giving the optimizer the knowledge that multiple
> aggregate functions use the share the same basic machinery and
> semantics for the state is the magic sauce that's a prerequisite for
> the several ideas we were each thinking of.

Why exactly do you need to invent an "aggregate class" concept for this?
Can't the planner just look in pg_aggregate to see that the
sfunc/stype/initcond are the same for two different aggregates?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-04-04 23:28:11 Re: [bug fix] pg_ctl always uses the same event source
Previous Message Tom Lane 2014-04-04 22:43:43 Re: [review] PostgreSQL Service on Windows does not start if data directory given is relative path