Re: BUG #16939: Plural interval for negative singular
Bruce Momjian <bruce@momjian.us>
From: Bruce Momjian <bruce@momjian.us>
To: Noah Misch <noah@leadboat.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, neverov.max@gmail.com, pgsql-bugs@lists.postgresql.org
Date: 2021-04-27T20:10:19Z
Lists: pgsql-bugs
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 <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" : ""); Yes, I found the same like you did. Are you saying we should remove the abs() calls here so we are consistent? -- Bruce Momjian <bruce@momjian.us> https://momjian.us EDB https://enterprisedb.com If only the physical world exists, free will is an illusion.
Commits
-
In messages, use singular nouns for -1, like we do for +1.
- 5da9868ed983 14.0 landed