| From: | Jeevan Chalke <jeevan(dot)chalke(at)enterprisedb(dot)com> |
|---|---|
| To: | Vik Fearing <vik(at)postgresfriends(dot)org> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Add PRODUCT() aggregate function |
| Date: | 2026-09-12 06:06:11 |
| Message-ID: | CAM2+6=X6SXR84otWjKxMOjrN_aqDCzf21CFc+0F7hca3pDrjrw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, Sep 11, 2026 at 5:53 PM Vik Fearing <vik(at)postgresfriends(dot)org> wrote:
>
> On 10/09/2026 17:11, Jeevan Chalke wrote:
>
> Hello Vik,
>
> On Thu, Sep 10, 2026 at 8:22 PM Vik Fearing <vik(at)postgresfriends(dot)org>
> wrote:
>
>> and it should accept the syntax
>>
>> PRODUCT(col, 1 ON EMPTY)
>>
>> for when there are no non-nulls in the input.
>>
>>
>> This will be required by the next edition of the SQL standard. The exact
>> value "1" is required by the standard, but I think we should allow any
>> a_expr there.
>>
>
> Regarding the ON EMPTY clause, I have actually already proposed a patch
> for that here:
> https://www.postgresql.org/message-id/CAM2+6=VS=fSKxfimW6Th9iu_xjbxOEAKg4eYwaa=SMg3X8pHaQ@mail.gmail.com
>
> It is designed to be applicable to any aggregate function. Note that in
> its current form, the patch accepts any arbitrary expression (constant) for
> the return value, rather than restricting it to a hard-coded literal.
>
> I would really appreciate it if you could take a look at those changes and
> share your reviews, feedback, or suggestions on that thread.
>
>
> I will definitely take a look at it.
>
That would be a great help, Vik.
I look forward to your feedback on the ON EMPTY thread.
> I can't keep up with this mailing list, so thank you for the pointer.
>
> --
>
> Vik Fearing
>
Thanks
--
*Jeevan Chalke*
*Senior Principal Engineer, Engineering Manager*
*Product Development*
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Pierre Forstmann | 2026-09-12 09:15:11 | Re: BUG #19631: currtid2() on a view with GROUP BY ctid crashes with XX000 |
| Previous Message | Chao Li | 2026-09-12 03:17:32 | Re: REPACK (CONCURRENTLY) decoding worker is canceled by lock_timeout |