pgsql: Avoid using ambiguous word "positive" in error message.

Started by Fujii Masaoover 4 years ago5 messages
#1Fujii Masao
fujii@postgresql.org

Avoid using ambiguous word "positive" in error message.

There are two identical error messages about valid value of modulus for
hash partition, in PostgreSQL source code. Commit 0e1275fb07 improved
only one of them so that ambiguous word "positive" was avoided there,
and forgot to improve the other. This commit improves the other.
Which would reduce translator burden.

Back-pach to v11 where the error message exists.

Author: Kyotaro Horiguchi
Reviewed-by: Fujii Masao
Discussion: /messages/by-id/20210819.170315.1413060634876301811.horikyota.ntt@gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/170aec63cd7139b453c52ad52bbeb83993faa31d

Modified Files
--------------
src/backend/parser/parse_utilcmd.c | 2 +-
src/test/regress/expected/alter_table.out | 2 +-
src/test/regress/expected/create_table.out | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)

#2Robert Haas
robertmhaas@gmail.com
In reply to: Fujii Masao (#1)
Re: pgsql: Avoid using ambiguous word "positive" in error message.

On Tue, Aug 24, 2021 at 10:49 PM Fujii Masao <fujii@postgresql.org> wrote:

Avoid using ambiguous word "positive" in error message.

The new style seems good, but I don't really agree that "positive" and
"non-negative" are ambiguous. "positive" means >0 and "non-negative"
means >= 0, because 0 is neither positive nor negative.

This is just nitpicking, though. I think the change is an improvement.

--
Robert Haas
EDB: http://www.enterprisedb.com

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Robert Haas (#2)
Re: pgsql: Avoid using ambiguous word "positive" in error message.

Robert Haas <robertmhaas@gmail.com> writes:

The new style seems good, but I don't really agree that "positive" and
"non-negative" are ambiguous. "positive" means >0 and "non-negative"
means >= 0, because 0 is neither positive nor negative.

Well, the point is precisely that not everyone makes that distinction.
I agree that everyone will read "non-negative" as ">= 0"; but there's
a fair percentage of the population that uses "positive" the same way.

regards, tom lane

#4Robert Haas
robertmhaas@gmail.com
In reply to: Tom Lane (#3)
Re: pgsql: Avoid using ambiguous word "positive" in error message.

On Mon, Aug 30, 2021 at 10:16 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:

Robert Haas <robertmhaas@gmail.com> writes:

The new style seems good, but I don't really agree that "positive" and
"non-negative" are ambiguous. "positive" means >0 and "non-negative"
means >= 0, because 0 is neither positive nor negative.

Well, the point is precisely that not everyone makes that distinction.
I agree that everyone will read "non-negative" as ">= 0"; but there's
a fair percentage of the population that uses "positive" the same way.

The mathematician in me recoils.

--
Robert Haas
EDB: http://www.enterprisedb.com

#5Andrew Dunstan
andrew@dunslane.net
In reply to: Robert Haas (#4)
Re: pgsql: Avoid using ambiguous word "positive" in error message.

On 8/30/21 10:19 AM, Robert Haas wrote:

On Mon, Aug 30, 2021 at 10:16 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:

Robert Haas <robertmhaas@gmail.com> writes:

The new style seems good, but I don't really agree that "positive" and
"non-negative" are ambiguous. "positive" means >0 and "non-negative"
means >= 0, because 0 is neither positive nor negative.

Well, the point is precisely that not everyone makes that distinction.
I agree that everyone will read "non-negative" as ">= 0"; but there's
a fair percentage of the population that uses "positive" the same way.

The mathematician in me recoils.

Yep, me too. IIRC Ada comes with a predefined subtype named "Positive"
which has the range 1..Integer'Max. It also has "Natural" which includes
zero.

cheers

andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com