From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | David Rowley <dgrowleyml(at)gmail(dot)com> |
Cc: | Josh Berkus <josh(at)agliodbs(dot)com>, Greg Stark <stark(at)mit(dot)edu>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [PATCH] Negative Transition Aggregate Functions (WIP) |
Date: | 2013-12-15 08:29:30 |
Message-ID: | 2568.1387096170@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
David Rowley <dgrowleyml(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | David Rowley | 2013-12-15 09:53:43 | Re: [PATCH] Negative Transition Aggregate Functions (WIP) |
Previous Message | Amit Kapila | 2013-12-15 07:12:41 | Re: Performance Improvement by reducing WAL for Update Operation |