Re: Implementing product-aggregate

From: Jan Kohnert <nospam001-lists(at)jan-kohnert(dot)de>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Implementing product-aggregate
Date: 2024-03-14 07:36:57
Message-ID: 9247987.CDJkKcVGEf@kohni-mobil
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi again,

Am Montag, 11. März 2024, 10:16:33 CET schrieb Jan Kohnert:
> create aggregate prod(numeric) (sfunc = numeric_mul, stype = numeric)

my basic idea was creating a function

create function multiply(arg1 numeric, arg2 numeric)
returns numeric
language sql
immutable
returns null on null input
return arg1 * arg2;

and use that function instead of the undocumented numeric_mul as the sfunc in
the aggregate definition.

Then again, this seems odd, too, since we're only reimplementing basic stuff that's
already there.

I'm still undecided...

--
MfG Jan

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2024-03-14 14:17:58 Re: Implementing product-aggregate
Previous Message Stephen Frost 2024-03-13 11:35:26 Re: could not open file "global/pg_filenode.map": Operation not permitted