Обсуждение: pgsql: In messages, use singular nouns for -1, like we do for +1.

Поиск
Список
Период
Сортировка

pgsql: In messages, use singular nouns for -1, like we do for +1.

От
Bruce Momjian
Дата:
In messages, use singular nouns for -1, like we do for +1.

This outputs "-1 year", not "-1 years".

Reported-by: neverov.max@gmail.com

Bug: 16939

Discussion: https://postgr.es/m/16939-cceeb03fb72736ee@postgresql.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5da9868ed983f95cc1cff80dcd81252a513774f8

Modified Files
--------------
src/backend/utils/adt/datetime.c          |  4 ++--
src/interfaces/ecpg/pgtypeslib/interval.c |  4 ++--
src/interfaces/libpq/fe-print.c           |  4 ++--
src/test/regress/expected/interval.out    | 22 +++++++++++-----------
4 files changed, 17 insertions(+), 17 deletions(-)


Re: pgsql: In messages, use singular nouns for -1, like we do for +1.

От
Alvaro Herrera
Дата:
On 2021-Mar-30, Bruce Momjian wrote:

> In messages, use singular nouns for -1, like we do for +1.
> 
> This outputs "-1 year", not "-1 years".

This broke the dblink test ...

-- 
Álvaro Herrera       Valdivia, Chile



Re: pgsql: In messages, use singular nouns for -1, like we do for +1.

От
Bruce Momjian
Дата:
On Tue, Mar 30, 2021 at 08:15:06PM -0300, Álvaro Herrera wrote:
> On 2021-Mar-30, Bruce Momjian wrote:
> 
> > In messages, use singular nouns for -1, like we do for +1.
> > 
> > This outputs "-1 year", not "-1 years".
> 
> This broke the dblink test ...

OK, checking.  I am testing check-world now.  Thanks.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  If only the physical world exists, free will is an illusion.




Re: pgsql: In messages, use singular nouns for -1, like we do for +1.

От
Bruce Momjian
Дата:
On Tue, Mar 30, 2021 at 07:20:32PM -0400, Bruce Momjian wrote:
> On Tue, Mar 30, 2021 at 08:15:06PM -0300, Álvaro Herrera wrote:
> > On 2021-Mar-30, Bruce Momjian wrote:
> > 
> > > In messages, use singular nouns for -1, like we do for +1.
> > > 
> > > This outputs "-1 year", not "-1 years".
> > 
> > This broke the dblink test ...
> 
> OK, checking.  I am testing check-world now.  Thanks.

Fixed, thanks.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  If only the physical world exists, free will is an illusion.