From: | David Rowley <dgrowleyml(at)gmail(dot)com> |
---|---|
To: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
Cc: | Kouhei Kaigai <kaigai(at)ak(dot)jp(dot)nec(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Amit Kapila <amit(dot)kapila(at)enterprisedb(dot)com> |
Subject: | Re: Combining Aggregates |
Date: | 2014-12-19 11:39:19 |
Message-ID: | CAApHDvq=ih-XbdYsZ6vGWE5FRoPc865vDj=oxfhnox77YoV9EQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 18 December 2014 at 02:48, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
>
>
> David, if you can update your patch with some docs to explain the
> behaviour, it looks complete enough to think about committing it in
> early January, to allow other patches that depend upon it to stand a
> chance of getting into 9.5. (It is not yet ready, but I see it could
> be).
>
>
Sure, I've more or less added the docs from your patch. I still need to
trawl through and see if there's anywhere else that needs some additions.
> The above example is probably the best description of the need, since
> user defined aggregates must also understand this.
>
> Could we please call these "combine functions" or other? MERGE is an
> SQL Standard statement type that we will add later, so it will be
> confusing if we use the "merge" word in this context.
>
>
Ok, changed.
> David, your patch avoids creating any mergefuncs for existing
> aggregates. We would need to supply working examples for at least a
> few of the builtin aggregates, so we can test the infrastructure. We
> can add examples for all cases later.
>
>
In addition to MIN(), MAX(), BIT_AND(), BIT_OR, SUM() for floating point
types, cash and interval. I've now added combine functions for count(*) and
count(col). It seems that int8pl() is suitable for this.
Do you think it's worth adding any new functions at this stage, or is it
best to wait until there's a patch which can use these?
Regards
David Rowley
Attachment | Content-Type | Size |
---|---|---|
combine_aggregate_state_v2.patch | application/octet-stream | 48.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2014-12-19 12:06:56 | Re: Role Attribute Bitmask Catalog Representation |
Previous Message | Chris Butler | 2014-12-19 11:16:14 | Re: Updated libpq5 packages cause connection errors on postgresql 9.2 |