| От | Jan Kohnert |
|---|---|
| Тема | Re: Implementing product-aggregate |
| Дата | |
| Msg-id | 9247987.CDJkKcVGEf@kohni-mobil обсуждение исходный текст |
| Ответ на | Implementing product-aggregate (Jan Kohnert <nospam001-lists@jan-kohnert.de>) |
| Ответы |
Re: Implementing product-aggregate
|
| Список | 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
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера