Re: pgsql: Provide overflow safe integer math inline functions.
Re: pgsql: Provide overflow safe integer math inline functions.
Re: Andres Freund 2017-12-13 <20171213173524.rjs7b3ahsong5zko@alap3.anarazel.de> > On 2017-12-13 09:37:25 -0500, Robert Haas wrote: > > On Wed, Dec 13, 2017 at 5:10 AM, Christoph Berg wrote: > > > Re: Andres Freund 2017-12-13 > > >> 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... I believe the attached is the correct version. Christoph
Re: pgsql: Provide overflow safe integer math inline functions.
От:
Andres Freund <andres@anarazel.de>
Дата:
Hi, On 2017-12-14 09:28:08 +0100, Christoph Berg wrote: > Re: Andres Freund 2017-12-13 <20171213173524.rjs7b3ahsong5zko@alap3.anarazel.de> > > After staring at it for a while, I seem to have partially mis-copied the > > note for addition to the subtraction operation... > > I believe the attached is the correct version. Thanks! Pushed. Schönen Abend, Andres