Re: Using 128-bit integers for sum, avg and statistics aggregates

From: Petr Jelinek <petr(at)2ndquadrant(dot)com>
To: David Fetter <david(at)fetter(dot)org>, Andreas Karlsson <andreas(at)proxel(dot)se>
Cc: Peter Geoghegan <pg(at)heroku(dot)com>, David Rowley <dgrowleyml(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Andres Freund <andres(at)2ndquadrant(dot)com>
Subject: Re: Using 128-bit integers for sum, avg and statistics aggregates
Date: 2015-03-09 17:57:28
Message-ID: 54FDDF08.9030602@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 09/03/15 18:39, David Fetter wrote:
> On Mon, Mar 09, 2015 at 01:39:04PM +0100, Andreas Karlsson wrote:
>> On 03/07/2015 07:18 PM, Petr Jelinek wrote:
>>
>>> What I am wondering is if those numeric_int16_* functions that also deal
>>> with either the Int128AggState or NumericAggState should be renamed in
>>> similar fashion.
>>
>> You mean something like numeric_poly_sum instead of numeric_int16_sum? I
>> personally am not fond of either name. While numeric_int16_* incorrectly
>> implies we have a int16 SQL type numeric_poly_* does not tell us that this
>> is an optimized version which uses a smaller state.
>
> Would it be simpler to write a separate patch to add an int16 SQL type
> so that this implication is correct?
>

No, because then you'd need to emulate the type on platforms where it
does not exist and the patch would be several times more complex for no
useful reason.

--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Gierth 2015-03-09 18:02:18 Re: Final Patch for GROUPING SETS
Previous Message Michael Meskes 2015-03-09 17:50:18 Re: Object files generated by ecpg test suite not ignored on Windows