summaryrefslogtreecommitdiff
path: root/src/backend/partitioning
diff options
context:
space:
mode:
authorFujii Masao <fujii@postgresql.org>2021-07-28 01:20:16 +0900
committerFujii Masao <fujii@postgresql.org>2021-07-28 01:20:16 +0900
commit0e1275fb073cbbff2185f4067d67785e56941e50 (patch)
treefa9f2bbfccb8d4420fd5cdb560f0357f42c9c519 /src/backend/partitioning
parent024515cac50e246d92bbe67e9de4da0f302972ef (diff)
downloadpostgresql-0e1275fb073cbbff2185f4067d67785e56941e50.tar.gz
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
Diffstat (limited to 'src/backend/partitioning')
-rw-r--r--src/backend/partitioning/partbounds.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/partitioning/partbounds.c b/src/backend/partitioning/partbounds.c
index 12599da9a8..25018b1a8b 100644
--- a/src/backend/partitioning/partbounds.c
+++ b/src/backend/partitioning/partbounds.c
@@ -4760,11 +4760,11 @@ satisfies_hash_partition(PG_FUNCTION_ARGS)
if (modulus <= 0)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("modulus for hash partition must be a positive integer")));
+ errmsg("modulus for hash partition must be an integer value greater than zero")));
if (remainder < 0)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("remainder for hash partition must be a non-negative integer")));
+ errmsg("remainder for hash partition must be an integer value greater than or equal to zero")));
if (remainder >= modulus)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),