Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uyBKg-004qKm-Cg for pgsql-bugs@arkaria.postgresql.org; Mon, 15 Sep 2025 15:41:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uyBKe-00CE4E-6h for pgsql-bugs@arkaria.postgresql.org; Mon, 15 Sep 2025 15:41:33 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uyBKd-00CE45-Ul for pgsql-bugs@lists.postgresql.org; Mon, 15 Sep 2025 15:41:32 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uyBKc-000Yzq-2L for pgsql-bugs@lists.postgresql.org; Mon, 15 Sep 2025 15:41:31 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 58FFfT1S615314; Mon, 15 Sep 2025 11:41:30 -0400 From: Tom Lane To: jbe-mlist@magnetkern.de cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #19053: Inconsistent arithmetic regarding TIMESTAMPTZ and INTERVAL In-reply-to: <19053-669df0ccf3d14d52@postgresql.org> References: <19053-669df0ccf3d14d52@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Mon, 15 Sep 2025 10:12:58 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <615312.1757950889.1@sss.pgh.pa.us> Date: Mon, 15 Sep 2025 11:41:29 -0400 Message-ID: <615313.1757950889@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form 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