Re: Remove dependence on integer wrapping - Mailing list pgsql-hackers

From Joseph Koshakow
Subject Re: Remove dependence on integer wrapping
Date
Msg-id CAAvxfHdEsD+NFTe3Co=JVvwSeU0pEBLZW4pAN7RVJf0UR=Faeg@mail.gmail.com
Whole thread Raw
In response to Re: Remove dependence on integer wrapping  (Nathan Bossart <nathandbossart@gmail.com>)
Responses Re: Remove dependence on integer wrapping
List pgsql-hackers
On Tue, Jun 11, 2024 at 12:22 PM Nathan Bossart <nathandbossart@gmail.com> wrote:

>    I personally find that much easier to read.  Since the existing open-coded
>    overflow check is apparently insufficient, I think there's a reasonably
>    strong case for centralizing this sort of thing so that we don't continue
>    to make the same mistakes.

Sounds good, the attached patch has these changes.

>    tm2timestamp() in src/interfaces/ecpg/pgtypeslib/timestamp.c has the same
>    comment.  The code there looks very similar to the code for tm2timestamp()
>    in the other timestamp.c...

The attached patch has updated this file too. For some reason I was
under the impression that I should leave the ecpg/ files alone, though
I can't remember why.

Thanks,
Joe Koshakow
Attachment

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Postgresql OOM
Next
From: Kyotaro Horiguchi
Date:
Subject: Re: 001_rep_changes.pl fails due to publisher stuck on shutdown