Re: Add PRODUCT() aggregate function

From: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
To: Jeevan Chalke <jeevan(dot)chalke(at)enterprisedb(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add PRODUCT() aggregate function
Date: 2026-06-23 08:37:11
Message-ID: CAEZATCXu4VfZe--_XHrmkUx4_DoKK=WpGcudG+nv0kSnaB7rkg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 23 Jun 2026 at 08:49, Jeevan Chalke
<jeevan(dot)chalke(at)enterprisedb(dot)com> wrote:
>
> PRODUCT() returns the product of all non-null input values. It is defined for
> int2, int4, int8, float4, float8 and numeric input, and always returns numeric.

I don't think that you need to define it for all those types. I
suspect that you could just define it for numeric and float8, and let
implicit casting do the rest.

Regards,
Dean

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dean Rasheed 2026-06-23 08:43:27 Re: Add PRODUCT() aggregate function
Previous Message Akshay Joshi 2026-06-23 08:34:42 Re: Fix variadic argument types for pg_get_xxx_ddl() functions