From a84f95ffddbf9bfcf20f7e3b463e10ba1ec0b9f5 Mon Sep 17 00:00:00 2001 From: Fujii Masao Date: Wed, 28 Jul 2021 01:25:53 +0900 Subject: 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 --- doc/src/sgml/sources.sgml | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'doc/src') diff --git a/doc/src/sgml/sources.sgml b/doc/src/sgml/sources.sgml index a1a14a43a07..179f4a19c2c 100644 --- a/doc/src/sgml/sources.sgml +++ b/doc/src/sgml/sources.sgml @@ -806,6 +806,16 @@ BETTER: unrecognized node type: 42 + + Non-negative + + Avoid non-negative as it is ambiguous + about whether it accepts zero. It's better to use + greater than zero or + greater than or equal to zero. + + + -- cgit v1.2.3