Re: Fix overflow hazard in interval rounding - Mailing list pgsql-hackers

From Joseph Koshakow
Subject Re: Fix overflow hazard in interval rounding
Date
Msg-id CAAvxfHdL5BVqN2mmNvfxgcxu27KDfiHbjpXd9QhZhsyTuhGaZA@mail.gmail.com
Whole thread Raw
In response to Re: Fix overflow hazard in interval rounding  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Fix overflow hazard in interval rounding
List pgsql-hackers


On Tue, Feb 13, 2024 at 1:46 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:

>    I think you need to use ereturn not ereport here; see other error
>    cases in AdjustIntervalForTypmod.

Attached is an updated patch that makes this adjustment.

>    (We'd need ereport in back branches, but this problem seems to
>    me to probably not be worth back-patching.)

Agreed, this seems like a pretty rare overflow/underflow.

Thanks,
Joe Koshakow
Attachment

pgsql-hackers by date:

Previous
From: vignesh C
Date:
Subject: Re: pg_upgrade and logical replication
Next
From: Tom Lane
Date:
Subject: Re: Fix overflow hazard in interval rounding