Re: [WIP Patch] Using 128-bit integers for sum, avg and statistics aggregates - Mailing list pgsql-hackers

From Andreas Karlsson
Subject Re: [WIP Patch] Using 128-bit integers for sum, avg and statistics aggregates
Date
Msg-id 544FB082.5090102@proxel.se
Whole thread Raw
In response to Re: [WIP Patch] Using 128-bit integers for sum, avg and statistics aggregates  (Heikki Linnakangas <hlinnakangas@vmware.com>)
List pgsql-hackers
On 10/28/2014 04:01 PM, Heikki Linnakangas wrote:
> Moving on to other issues, isn't 128 bits too small to store the squares
> of the processed numbers? That could overflow..

Yeah, which is why stddev_*(int8) and var_*(int8) still have to use 
Numeric in the aggregate state. For the int2 and int4 versions it is 
fine to use __int128_t.

Andreas




pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: [WIP Patch] Using 128-bit integers for sum, avg and statistics aggregates
Next
From: Stephen Frost
Date:
Subject: Re: Directory/File Access Permissions for COPY and Generic File Access Functions