From: Noah Misch <noah@leadboat.com>
To: Bruce Momjian <bruce@momjian.us>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: neverov.max@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16939: Plural interval for negative singular
Date: Mon, 26 Apr 2021 23:13:29 -0700
Message-ID: <20210427061329.GB2435607@rfd.leadboat.com> (raw)
In-Reply-To: <20210426170616.GV7629@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>
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 <bruce@momjian.us> 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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: noah@leadboat.com, bruce@momjian.us, tgl@sss.pgh.pa.us, neverov.max@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16939: Plural interval for negative singular
In-Reply-To: <20210427061329.GB2435607@rfd.leadboat.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox