From 3bf651b5224915045c824eee48a5c3441432ccca Mon Sep 17 00:00:00 2001
From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Date: Thu, 19 Aug 2021 16:53:24 +0900
Subject: [PATCH 1/3] Additional message fix related to "positive" wordings

While fd90f6ba7a intended to eliminate the usage of "positive integer"
and alike, it forgot to fix the same messages other places.  Complete
the work.
---
 src/backend/parser/parse_utilcmd.c | 2 +-
 src/backend/utils/adt/tsquery.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c
index 675e400839..3b656f2f13 100644
--- a/src/backend/parser/parse_utilcmd.c
+++ b/src/backend/parser/parse_utilcmd.c
@@ -4035,7 +4035,7 @@ transformPartitionBound(ParseState *pstate, Relation parent,
 		if (spec->modulus <= 0)
 			ereport(ERROR,
 					(errcode(ERRCODE_INVALID_TABLE_DEFINITION),
-					 errmsg("modulus for hash partition must be a positive integer")));
+					 errmsg("modulus for hash partition must be an integer greater than zero")));
 
 		Assert(spec->remainder >= 0);
 
diff --git a/src/backend/utils/adt/tsquery.c b/src/backend/utils/adt/tsquery.c
index b2ca0d2f8a..ded919b39b 100644
--- a/src/backend/utils/adt/tsquery.c
+++ b/src/backend/utils/adt/tsquery.c
@@ -196,7 +196,7 @@ parse_phrase_operator(TSQueryParserState pstate, int16 *distance)
 				else if (errno == ERANGE || l < 0 || l > MAXENTRYPOS)
 					ereport(ERROR,
 							(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-							 errmsg("distance in phrase operator should not be greater than %d",
+							 errmsg("distance in phrase operator must be an integer value between zero and %d inclusive",
 									MAXENTRYPOS)));
 				else
 				{
-- 
2.27.0

