diff options
author | Fujii Masao <fujii@postgresql.org> | 2021-07-28 01:21:52 +0900 |
---|---|---|
committer | Fujii Masao <fujii@postgresql.org> | 2021-07-28 01:24:24 +0900 |
commit | de87c481f635953e84e7d3b404e15700301bcdac (patch) | |
tree | f8fce81f4114a3bb72f58952af1133d0591e517d /src/backend/utils/adt/tsquery_op.c | |
parent | 7626e9f2be7d0fc9b20936910831b900b555728b (diff) | |
download | postgresql-de87c481f635953e84e7d3b404e15700301bcdac.tar.gz postgresql-de87c481f635953e84e7d3b404e15700301bcdac.zip |
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/utils/adt/tsquery_op.c')
-rw-r--r-- | src/backend/utils/adt/tsquery_op.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/utils/adt/tsquery_op.c b/src/backend/utils/adt/tsquery_op.c index 1f63d9b6a96..be4ceb52061 100644 --- a/src/backend/utils/adt/tsquery_op.c +++ b/src/backend/utils/adt/tsquery_op.c @@ -120,7 +120,7 @@ tsquery_phrase_distance(PG_FUNCTION_ARGS) if (distance < 0 || distance > MAXENTRYPOS) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("distance in phrase operator should be non-negative and less than %d", + errmsg("distance in phrase operator must be an integer value between zero and %d inclusive", MAXENTRYPOS))); if (a->size == 0) { |