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

From: Andrei Lepikhov <lepihov(at)gmail(dot)com>
To: David Rowley <dgrowleyml(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 06:31:44
Message-ID: 1850b0e8-ec3b-47cb-bcba-5648a82280d4@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 18/08/2026 06:56, David Rowley wrote:
> 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?
Yes, I can do it manually in pg_catalog for now - rewriting prosupport and
setting the dependency in the pg_depend. There’s no rush - it’s just about
keeping things tidy.

--
regards, Andrei Lepikhov,
pgEdge

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zsolt Parragi 2026-08-18 06:53:31 Re: pg_stat_database.checksum_failures misses single-page failures in backups
Previous Message zengman 2026-08-18 06:27:17 Uninitialized heap memory returned by pg_event_trigger_table_rewrite_reason()