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 1lbGya-0006T0-HR for pgsql-bugs@arkaria.postgresql.org; Tue, 27 Apr 2021 06:13:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lbGyY-0003oq-P1 for pgsql-bugs@arkaria.postgresql.org; Tue, 27 Apr 2021 06:13:38 +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 1lbGyY-0003oi-Io for pgsql-bugs@lists.postgresql.org; Tue, 27 Apr 2021 06:13:38 +0000 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lbGyT-0000Zi-He for pgsql-bugs@lists.postgresql.org; Tue, 27 Apr 2021 06:13:37 +0000 Received: by mail-pl1-x62b.google.com with SMTP id y1so14626790plg.11 for ; Mon, 26 Apr 2021 23:13:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=o2+8XH+v6Q2vDEeBLR5Hnm6vtsGe3vZzdvRVkgRNkwg=; b=RlfHm0Nz8L+GJMf0vGQ0gqdSDcr2kaR+of7USk7mFnEIpO3/qssS/WcIqZY9w9XK9R hIDqFFyQ7hmqMbq+w+bSmlmbuE4u2NgJjpr5T1mmgFHnuhm9v1tslCFgmPYhaDZzHErt oJ5PASzLOO7f2ehHjouv8W3/G/2Z1bB4BmWXg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=o2+8XH+v6Q2vDEeBLR5Hnm6vtsGe3vZzdvRVkgRNkwg=; b=c4qCYHf61I/Oz+kjDB9j8/p9CphBhhVWlZ+i8RBPlF4fr7J9ZOLuIHqzoW8AbAz3L+ MmThOvHVuJ2eInu5kSBzOMvKlIkymo9qrKBxtyfXQNLfEnqk3coCP+QKOkSF/b3sMPac U4L578pcV3JdtggQsHVyxS23lIT9xoIB2wYPmGYgVjezRIX2cZvKGWfmm6Wc3zXmrEjB JBPQyaA2UZJjoaxQT0Fh4OcgE9OmmEv6y3vCFkfnH8EHcqmSvImqgfAfateJyA0kLUVf yxdQMeh9H6wzF5wDx3AyQhCt/RHzGki3t0kIiH8FYLWykipsi+A+GiLXCB7ll9foWXlx m/Lw== X-Gm-Message-State: AOAM532MF3rSJWzwf26QxvtO7uMmUoAjI9xcu2gWTHn2YE7fSvsHa1hn O6nws3sy0+j0MReT38vw9rs3zw== X-Google-Smtp-Source: ABdhPJxY+0Lozsu6Pntj0T3zEH8aX1LPiRmAigfWyIvmpwIKjnlBMrM/5o7RsUZS0KI6DKxQHGYssg== X-Received: by 2002:a17:902:f2d1:b029:eb:2e32:8804 with SMTP id h17-20020a170902f2d1b02900eb2e328804mr23074454plc.40.1619504012507; Mon, 26 Apr 2021 23:13:32 -0700 (PDT) Received: from rfd.leadboat.com ([2600:1702:a20:5750::46]) by smtp.gmail.com with ESMTPSA id f3sm1331807pjo.3.2021.04.26.23.13.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Apr 2021 23:13:32 -0700 (PDT) Date: Mon, 26 Apr 2021 23:13:29 -0700 From: Noah Misch To: Bruce Momjian Cc: Tom Lane , neverov.max@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16939: Plural interval for negative singular Message-ID: <20210427061329.GB2435607@rfd.leadboat.com> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210426170616.GV7629@momjian.us> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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" : ""); > > As far as the changes in datetime.c and interval.c are concerned, > > yes. I don't care too much about what you did in fe-print.c, > > Well, we should then add a comment that this is inconsistent but should > not be changed. No objection to having a comment.