Re: SUM(int2)/SUM(int4) do not detect overflow of the int8 accumulator

From: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Andrei Lepikhov <lepihov(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Nathan Bossart <nathandbossart(at)gmail(dot)com>
Subject: Re: SUM(int2)/SUM(int4) do not detect overflow of the int8 accumulator
Date: 2026-09-03 00:42:43
Message-ID: 0009ED33-55A5-42E1-9A67-01750B65DB8B@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Sep 3, 2026, at 08:10, Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> On Wed, Sep 02, 2026 at 07:56:32PM -0400, Andres Freund wrote:
>> FWIW, I think we should seriously consider making [almost] all the transition
>> states internal. Having to support calling these functions in non-aggregate
>> contexts adds complexity without any actual gain. We shouldn't need to check
>> whether we are in an AggContext, whether the argument is toasted, whether
>> there are NULL elements in the array, compute offsets into the array, etc.
>
> +1.
> --
> Michael

+1

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2026-09-03 00:45:06 Re: SUM(int2)/SUM(int4) do not detect overflow of the int8 accumulator
Previous Message Michael Paquier 2026-09-03 00:40:23 Re: Remove fcinfo from statistics update internal functions