From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Florian Pflug <fgp(at)phlo(dot)org> |
Cc: | Kevin Grittner <kgrittn(at)ymail(dot)com>, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, Greg Stark <stark(at)mit(dot)edu>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, David Rowley <dgrowleyml(at)gmail(dot)com> |
Subject: | Re: [PATCH] Negative Transition Aggregate Functions (WIP) |
Date: | 2014-01-10 19:07:12 |
Message-ID: | 15020.1389380832@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Florian Pflug <fgp(at)phlo(dot)org> writes:
> On Jan10, 2014, at 19:08 , Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Although, having said that ... maybe "build your own aggregate" would
>> be a reasonable suggestion for people who need this? I grant that
>> it's going to be a minority requirement, maybe even a small minority
>> requirement. People who have the chops to get this sort of thing right
>> can probably manage a custom aggregate definition.
> So we'd put a footgun into the hands of people who don't know what they're
> doing, to be fired for performance's sake, and leave it to the people
> who know what they are doing to put the safety on?
If I may put words in Kevin's mouth, I think his point is that having
float8 sum() at all is a foot-gun, and that's hard to deny. You need
to know how to use it safely.
A compromise compromise might be to provide these alternative "safer"
aggregates built-in. Or, depending on what color you like your bikeshed,
leave the standard aggregates alone and define "fast_sum" etc for the less
safe versions. In any case it'd be incumbent on us to document the
tradeoffs.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2014-01-10 19:13:07 | Re: new json funcs |
Previous Message | Tom Lane | 2014-01-10 19:02:06 | Re: [ANNOUNCE] IMCS: In Memory Columnar Store for PostgreSQL |