Re: Silent overflow of interval type

From: Andrey Borodin <amborodin86(at)gmail(dot)com>
To: Nikolai <pgnickb(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Silent overflow of interval type
Date: 2023-02-15 20:24:24
Message-ID: CAAhFRxgC3fxHq4AgE=Mty9sL7=VWsWBBdVmaqJ53zBGEWfdtOQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Feb 15, 2023 at 7:08 AM Nikolai <pgnickb(at)gmail(dot)com> wrote:
>
> The patch attached simply throws an error when an overflow is
> detected. However I'm not sure this is a reasonable approach for a
> code path that could be very hot in some workloads.

Given the extraordinary amount of overflow checks in the nearby code
of timestamp.c, I'd say that this case should not be an exception.
By chance did you look at all other nearby cases, is it the only place
with overflow? (I took a look too, but haven't found anything
suspicious)

Best regards, Andrey Borodin.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2023-02-15 20:49:47 Re: doc: add missing "id" attributes to extension packaging page
Previous Message Karl O. Pinc 2023-02-15 19:34:37 Re: doc: add missing "id" attributes to extension packaging page