Re: Allow a prosupport function to be attached to an aggregate

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Andrei Lepikhov <lepihov(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
Subject: Re: Allow a prosupport function to be attached to an aggregate
Date: 2026-08-18 04:56:59
Message-ID: CAApHDvpE-_CnMOQ=Y8wveUk-MrUzsyR66fXGq+R7j_g4tmra8g@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 17 Aug 2026 at 18:13, Andrei Lepikhov <lepihov(at)gmail(dot)com> wrote:
> Commit 42473b3b31 added SupportRequestSimplifyAggref, which the planner issues
> for any Aggref whose function names a support function. Nice, but extensions
> cannot reach it, because there is no way to attach a support function to an
> aggregate:
>
> ALTER FUNCTION pg_catalog.sum(numeric) SUPPORT numeric_support;
> ERROR: "pg_catalog.sum" is an aggregate function

I failed to realise that there was no way to set that for user-defined
aggregates. Not good. While I do agree that lack of extensibility is
not aligned with the spirit of the project, my current thoughts are
that now is a bit late to add this to v19.

Is delaying this until v20 fine for you?

Or does anyone else feel this is a must-fix for v19?

David

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Shinya Kato 2026-08-18 05:07:02 pgbench: \gset and \aset should store SQL NULL as the null value
Previous Message Bertrand Drouvot 2026-08-18 04:55:51 Re: pg_control_checkpoint(): add "data_checksum_version" (Pg19)?