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 1lbU2R-0001h2-O7 for pgsql-bugs@arkaria.postgresql.org; Tue, 27 Apr 2021 20:10:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lbU2P-0007yA-Ei for pgsql-bugs@arkaria.postgresql.org; Tue, 27 Apr 2021 20:10:29 +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 1lbU2P-0007y3-8i for pgsql-bugs@lists.postgresql.org; Tue, 27 Apr 2021 20:10:29 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lbU2L-0004Qu-E7 for pgsql-bugs@lists.postgresql.org; Tue, 27 Apr 2021 20:10:28 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1lbU2F-0001tw-Vp; Tue, 27 Apr 2021 16:10:19 -0400 Date: Tue, 27 Apr 2021 16:10:19 -0400 From: Bruce Momjian To: Noah Misch Cc: Tom Lane , neverov.max@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16939: Plural interval for negative singular Message-ID: <20210427201019.GY7629@momjian.us> References: <16939-cceeb03fb72736ee@postgresql.org> <20210323160336.GE579@momjian.us> <20210425115726.GA2353095@rfd.leadboat.com> <20210426163116.GR7629@momjian.us> <2266336.1619455534@sss.pgh.pa.us> <20210426165435.GT7629@momjian.us> <2267469.1619456564@sss.pgh.pa.us> <20210426170616.GV7629@momjian.us> <20210427061329.GB2435607@rfd.leadboat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210427061329.GB2435607@rfd.leadboat.com> 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 Mon, Apr 26, 2021 at 11:13:29PM -0700, Noah Misch wrote: > On Mon, Apr 26, 2021 at 01:06:16PM -0400, Bruce Momjian wrote: > > On Mon, Apr 26, 2021 at 01:02:44PM -0400, Tom Lane wrote: > > > Bruce Momjian writes: > > > > On Mon, Apr 26, 2021 at 12:45:34PM -0400, Tom Lane wrote: > > > >> I agree with Noah's opinion that we should stick to the historical > > > >> behavior in the interval I/O functions. There is not enough solidity > > > >> in the "this is grammatically wrong" argument to justify taking any > > > >> risk of application breakage, and it seems like there is some risk of > > > >> that there. > > > > > > > Are you saying we should revert the patch and leave the plurals > > > > inconsistent in different places? We were already expressing -1 as > > > > singular in most of the places I saw. > > Which places did you find? I used the following to check for code like you > were adding, but it probably missed things: > > $ git grep '"s"' 5da9868^ | grep abs > 5da9868^:src/backend/utils/adt/datetime.c: (abs(sec) != 1 || fsec != 0) ? "s" : ""); > 5da9868^:src/interfaces/ecpg/pgtypeslib/interval.c: (abs(sec) != 1 || fsec != 0) ? "s" : ""); Yes, I found the same like you did. Are you saying we should remove the abs() calls here so we are consistent? -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com If only the physical world exists, free will is an illusion.