Re: BUG #19053: Inconsistent arithmetic regarding TIMESTAMPTZ and INTERVAL - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #19053: Inconsistent arithmetic regarding TIMESTAMPTZ and INTERVAL
Date
Msg-id 615313.1757950889@sss.pgh.pa.us
Whole thread Raw
In response to BUG #19053: Inconsistent arithmetic regarding TIMESTAMPTZ and INTERVAL  (PG Bug reporting form <noreply@postgresql.org>)
Responses Re: BUG #19053: Inconsistent arithmetic regarding TIMESTAMPTZ and INTERVAL
List pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> Consider the following calculations:

AFAICS all of these are behaving as-expected.  Yeah, it's confusing,
but expecting calendar calculations to have mathematical rigor is
a fool's errand.  The intent of what's implemented is to produce
useful results for calculations like

regression=# SELECT TIMESTAMPTZ '2025-03-30' + INTERVAL '1 day';
        ?column?        
------------------------
 2025-03-31 00:00:00+02
(1 row)

despite the intervening DST change.

            regards, tom lane



pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #19053: Inconsistent arithmetic regarding TIMESTAMPTZ and INTERVAL
Next
From: ocean_li_996
Date:
Subject: Re:BUG #19053: Inconsistent arithmetic regarding TIMESTAMPTZ and INTERVAL