Re: [PATCH] Negative Transition Aggregate Functions (WIP)
От | Tom Lane |
---|---|
Тема | Re: [PATCH] Negative Transition Aggregate Functions (WIP) |
Дата | |
Msg-id | 2568.1387096170@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: [PATCH] Negative Transition Aggregate Functions (WIP) (David Rowley <dgrowleyml@gmail.com>) |
Ответы |
Re: [PATCH] Negative Transition Aggregate Functions (WIP)
|
Список | pgsql-hackers |
David Rowley <dgrowleyml@gmail.com> writes: > I guess the answer for the people that complain about slowness could be > that they create their own aggregate function which implements float4pl as > the trans function and float4mi as the negative trans function. They can > call it SUMFASTBUTWRONG() if they like. Perhaps it would be worth a note in > the documents for this patch? I think it would be an absolutely perfect documentation example to show how to set up such an aggregate (and then point out the risks, of course). > As for numeric, I did start working on this just after I posted the > original patch and before I saw your comment about it. I did end up making > do_numeric_desperse() which was to be the reverse of do_numeric_accum(), > but I got stuck on the equivalent of when do_numeric_accum() > does mul_var(&X, &X, &X2, X.dscale * 2); Ummm ... why doesn't it work to just use numeric_add and numeric_sub, exactly parallel to the float case? regards, tom lane
В списке pgsql-hackers по дате отправления: