pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fujii Masao <fujii@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Avoid using ambiguous word "non-negative" in error messages.
Date: Tue, 27 Jul 2021 16:30:09 +0000
Message-ID: <E1m8Py5-0004Sj-RZ@gemulon.postgresql.org> (raw)

Avoid using ambiguous word "non-negative" in error messages.

The error messages using the word "non-negative" are confusing
because it's ambiguous about whether it accepts zero or not.
This commit improves those error messages by replacing it with
less ambiguous word like "greater than zero" or
"greater than or equal to zero".

Also this commit added the note about the word "non-negative" to
the error message style guide, to help writing the new error messages.

When postgres_fdw option fetch_size was set to zero, previously
the error message "fetch_size requires a non-negative integer value"
was reported. This error message was outright buggy. Therefore
back-patch to all supported versions where such buggy error message
could be thrown.

Reported-by: Hou Zhijie
Author: Bharath Rupireddy
Reviewed-by: Kyotaro Horiguchi, Fujii Masao
Discussion: https://postgr.es/m/OS0PR01MB5716415335A06B489F1B3A8194569@OS0PR01MB5716.jpnprd01.prod.outlook.com

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/42e6b5ccb777a8d18ecc26140d4044af5bccc9b3

Modified Files
--------------
contrib/postgres_fdw/option.c           | 13 ++++++++-----
doc/src/sgml/sources.sgml               | 10 ++++++++++
src/backend/partitioning/partbounds.c   |  4 ++--
src/backend/utils/adt/tsquery_op.c      |  2 +-
src/test/modules/test_shm_mq/test.c     | 10 +++++-----
src/test/regress/expected/hash_part.out |  4 ++--
6 files changed, 28 insertions(+), 15 deletions(-)



view thread (7+ messages)  latest in thread

Message-ID: <E1m8Py5-0004Sj-RZ@gemulon.postgresql.org>
Permalink:  ../E1m8Py5-0004Sj-RZ@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1m8Py5-0004Sj-RZ@gemulon.postgresql.org

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: fujii@postgresql.org
  Subject: Re: pgsql: Avoid using ambiguous word "non-negative" in error messages.
  In-Reply-To: <E1m8Py5-0004Sj-RZ@gemulon.postgresql.org>
  References: <E1m8Py5-0004Sj-RZ@gemulon.postgresql.org>

* 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