Re: Getting rid of aggregate_dummy()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Getting rid of aggregate_dummy()
Date: 2020-11-04 16:32:56
Message-ID: 1187259.1604507576@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> Heikki Linnakangas <hlinnaka(at)iki(dot)fi> writes:
>> On 01/11/2020 22:47, Tom Lane wrote:
>>> With that, we don't actually need aggregate_dummy() to exist at
>>> all, because it's never referenced. Having "aggregate_dummy"
>>> as the prosrc value for an aggregate function is now just a
>>> random convention; any other string would do as well. (We could
>>> save a few bytes in pg_proc by choosing a shorter string, but
>>> probably it's better to stick to the existing convention.)

>> NULL would seem like the natural value for that.

> I wouldn't be in favor of that unless we changed the prolang value
> as well. Which could certainly be considered, but it makes the
> patch rather more invasive, and I'm not sure it's worth it.

Looking closer, I see that pg_proc.prosrc is marked NOT NULL,
so this couldn't work anyway unless we wish to remove that marking.
Which doesn't seem particularly wise. I pushed this without any
change in the catalog contents.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Banck 2020-11-04 16:41:39 Re: Online verification of checksums
Previous Message Stephen Frost 2020-11-04 16:02:14 Re: automatic analyze: readahead - add "IO read time" log message