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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrei Lepikhov <lepihov(at)gmail(dot)com>
Cc: David Rowley <dgrowleyml(at)gmail(dot)com>, 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-20 20:06:39
Message-ID: 4008013.1787256399@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> After reflection I realized that the approach I took in my first patch
> is wrong: letting ALTER FUNCTION work on an aggregate is pretty
> non-orthogonal, if the only property it can set is SUPPORT. The right
> way to do this is to add a SUPPORT option to CREATE AGGREGATE, which
> slots nicely into getting pg_dump to handle it. As attached.

Grumble ... for some reason I was thinking that ProcedureCreate would
handle checking for superuser when specifying a support function,
but it doesn't; AggregateCreate must do that. v3 attached contains
just that one addition.

regards, tom lane

Attachment Content-Type Size
v3-0001-Allow-an-aggregate-s-planner-support-function-to-.patch text/x-diff 14.6 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2026-08-20 20:32:39 Re: Fix for fragile code in ltree/crc32.c
Previous Message Pavel Stehule 2026-08-20 19:56:52 Re: toast table corrupted by vacuum - missing chunk number 0 for toast value