Re: pgsql: Provide overflow safe integer math inline functions.

From: Andres Freund <andres(at)anarazel(dot)de>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Christoph Berg <myon(at)debian(dot)org>, pgsql-committers <pgsql-committers(at)postgresql(dot)org>
Subject: Re: pgsql: Provide overflow safe integer math inline functions.
Date: 2017-12-13 17:35:24
Message-ID: 20171213173524.rjs7b3ahsong5zko@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On 2017-12-13 09:37:25 -0500, Robert Haas wrote:
> On Wed, Dec 13, 2017 at 5:10 AM, Christoph Berg <myon(at)debian(dot)org> wrote:
> > Re: Andres Freund 2017-12-13 <E1eOvQF-00075r-Cy(at)gemulon(dot)postgresql(dot)org>
> >> Provide overflow safe integer math inline functions.
> >
> > The new _overflow functions have buggy comments:
> >
> > /*
> > * If a - b overflows, return true, otherwise store the result of a + b into
> > * *result. ^ there
>
> What's wrong with that?

After staring at it for a while, I seem to have partially mis-copied the
note for addition to the subtraction operation...

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2017-12-13 18:56:01 pgsql: Rethink MemoryContext creation to improve performance.
Previous Message Peter Eisentraut 2017-12-13 16:03:00 pgsql: Start a separate test suite for plpgsql

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2017-12-13 18:34:49 Re: [HACKERS] Custom compression methods
Previous Message Konstantin Knizhnik 2017-12-13 17:32:57 Re: [HACKERS] Surjective functional indexes