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 1m8UO8-00016A-7u for pgsql-hackers@arkaria.postgresql.org; Tue, 27 Jul 2021 21:13:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m8UO6-00077N-UL for pgsql-hackers@arkaria.postgresql.org; Tue, 27 Jul 2021 21:13:18 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m8UO6-000777-Mn for pgsql-hackers@lists.postgresql.org; Tue, 27 Jul 2021 21:13:18 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m8UO4-0007Qh-FR for pgsql-hackers@lists.postgresql.org; Tue, 27 Jul 2021 21:13:17 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1m8UO2-0000Kd-OQ; Tue, 27 Jul 2021 17:13:14 -0400 Date: Tue, 27 Jul 2021 17:13:14 -0400 From: Bruce Momjian To: Tom Lane Cc: Bryn Llewellyn , pgsql-hackers list Subject: Re: Have I found an interval arithmetic bug? Message-ID: <20210727211314.GA23040@momjian.us> References: <20210402180549.GF9270@momjian.us> <20210402234943.GB29126@momjian.us> <95D98B9E-CD54-4FAC-9574-D950E9741CAC@yugabyte.com> <20210403010229.GE29126@momjian.us> <20210727193614.GE19774@momjian.us> <456756.1627416114@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <456756.1627416114@sss.pgh.pa.us> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Jul 27, 2021 at 04:01:54PM -0400, Tom Lane wrote: > Bruce Momjian writes: > > I went ahead and modified the interval multiplication/division functions > > to use the same logic as fractional interval units: > > Wait. A. Minute. > > What I think we have consensus on is that interval_in is doing the > wrong thing in a particular corner case. I have heard nobody but > you suggesting that we should start undertaking behavioral changes > in other interval functions, and I don't believe that that's a good > road to start going down. These behaviors have stood for many years. > Moreover, since the whole thing is by definition operating with > inadequate information, it is inevitable that for every case you > make better there will be another one you make worse. Bryn mentioned this so I thought I would see what the result looks like. I am fine to skip them. > I'm really not on board with changing anything except interval_in, > and even there, we had better be certain that everything we change > is a case that is certainly being made better. Well, I think what I had before the multiply/divide changes were acceptable to everyone except Bryn, who was looking for more consistency. > BTW, please do not post patches as gzipped attachments, unless > they're enormous. You're just adding another step making it > harder for people to look at them. OK, what is large for you? 100k bytes? I was using 10k bytes. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com If only the physical world exists, free will is an illusion.