Re: Add PRODUCT() aggregate function

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

... btw, there is another interesting definitional question here.
AFAICS, "ON EMPTY" effectively is an override for the aggregate's
final function. Does it actually make sense when there is a final
function? Specifically, if the final function were willing to
provide non-null output for zero rows in, should we still override
it? SUM and PRODUCT don't provide a lot of guidance here.

I'm also wondering idly how this interacts with "inverse transition
functions" for aggregates used as window functions.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hayato Kuroda (Fujitsu) 2026-09-11 02:51:01 RE: pg_createsubscriber does not check output_plugin_libraries
Previous Message Chao Li 2026-09-11 02:32:34 Re: Fix failing assert in deferred constraint trigger