Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m690S-0005yU-AS for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Jul 2021 09:59:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m690Q-000361-AQ for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Jul 2021 09:59:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m690Q-00035t-2b for pgsql-hackers@lists.postgresql.org; Wed, 21 Jul 2021 09:59:10 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m690M-0007Sk-Fd for pgsql-hackers@postgresql.org; Wed, 21 Jul 2021 09:59:09 +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 16L9wx9Q677938; Wed, 21 Jul 2021 05:58:59 -0400 From: Tom Lane To: Dean Rasheed cc: Bruce Momjian , Zhihong Yu , Daniel Gustafsson , Bryn Llewellyn , Justin Pryzby , Isaac Morland , John W Higgins , PostgreSQL-development Subject: Re: Have I found an interval arithmetic bug? In-reply-to: References: <20210508024204.GB27048@momjian.us> <076E1871-8446-405C-9561-29FA03F46A4A@yesql.se> <20210630163516.GA3304@momjian.us> <20210720041419.GA5882@momjian.us> <20210720225350.GB27025@momjian.us> <20210721024834.GA8395@momjian.us> Comments: In-reply-to Dean Rasheed message dated "Wed, 21 Jul 2021 09:23:18 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <677936.1626861539.1@sss.pgh.pa.us> Date: Wed, 21 Jul 2021 05:58:59 -0400 Message-ID: <677937.1626861539@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Dean Rasheed writes: > Hmm, looking at this whole thread, I have to say that I prefer the old > behaviour of spilling down to lower units. > For example, with this patch: > SELECT '0.5 weeks'::interval; > interval > ---------- > 4 days > which I don't think is really an improvement. My expectation is that > half a week is 3.5 days, and I prefer what it used to return, namely > '3 days 12:00:00'. Yeah, that is clearly a significant dis-improvement. In general, considering that (most of?) the existing behavior has stood for decades, I think we need to tread VERY carefully about changing it. I don't want to see this patch changing any case that is not indisputably broken. regards, tom lane