| 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:43:27 |
| Message-ID: | CAEZATCWScc_bu0GHuLv-OsR5UFXUaaQRSqh+J3twuNnvJRKvUA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Tue, 23 Jun 2026 at 09:37, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> wrote:
>
> 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.
... and perhaps make the float8 version return float8.
Regards,
Dean
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Amit Kapila | 2026-06-23 08:52:29 | Re: Add a hook for handling logical decoding messages on subscribers. |
| Previous Message | Dean Rasheed | 2026-06-23 08:37:11 | Re: Add PRODUCT() aggregate function |