Re: Add PRODUCT() aggregate function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Isaac Morland <isaac(dot)morland(at)gmail(dot)com>
Cc: Vik Fearing <vik(at)postgresfriends(dot)org>, Jeevan Chalke <jeevan(dot)chalke(at)enterprisedb(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add PRODUCT() aggregate function
Date: 2026-09-11 01:21:29
Message-ID: 944382.1789089689@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Isaac Morland <isaac(dot)morland(at)gmail(dot)com> writes:
> Out of curiosity, was there any thought given to the idea that it should be
> an attribute of the aggregate itself?

SUM over no rows has been defined to return NULL for decades. They
can't just up and change that. They could have instead defined a
new aggregate (SUM0, maybe) but chose not to.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2026-09-11 01:35:01 Re: Identifier downcase change for LATIN1, in v19
Previous Message Isaac Morland 2026-09-11 01:13:42 Re: Add PRODUCT() aggregate function