Re: BUG #19053: Inconsistent arithmetic regarding TIMESTAMPTZ and INTERVAL

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: jbe-mlist@magnetkern.de
Cc: pgsql-bugs@lists.postgresql.org
Date: 2025-09-15T15:41:29Z
Lists: 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