From 8f4f993de671f0af594614b1a3e3218ee3d5fe70 Mon Sep 17 00:00:00 2001
From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Date: Thu, 19 Aug 2021 16:21:02 +0900
Subject: [PATCH 3/3] Exterminate usages of "positive"

Additional fix for "positive number"s.
---
 doc/src/sgml/ref/create_function.sgml | 4 ++--
 src/backend/commands/functioncmds.c   | 4 ++--
 src/backend/tsearch/wparser_def.c     | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/doc/src/sgml/ref/create_function.sgml b/doc/src/sgml/ref/create_function.sgml
index 7e6d52c7dc..1e10ac14c4 100644
--- a/doc/src/sgml/ref/create_function.sgml
+++ b/doc/src/sgml/ref/create_function.sgml
@@ -464,7 +464,7 @@ CREATE [ OR REPLACE ] FUNCTION
 
      <listitem>
       <para>
-       A positive number giving the estimated execution cost for the function,
+       A number greater than zero giving the estimated execution cost for the function,
        in units of <xref linkend="guc-cpu-operator-cost"/>.  If the function
        returns a set, this is the cost per returned row.  If the cost is
        not specified, 1 unit is assumed for C-language and internal functions,
@@ -480,7 +480,7 @@ CREATE [ OR REPLACE ] FUNCTION
 
      <listitem>
       <para>
-       A positive number giving the estimated number of rows that the planner
+       A number greater than zero giving the estimated number of rows that the planner
        should expect the function to return.  This is only allowed when the
        function is declared to return a set.  The default assumption is
        1000 rows.
diff --git a/src/backend/commands/functioncmds.c b/src/backend/commands/functioncmds.c
index 79d875ab10..80f9f1a22b 100644
--- a/src/backend/commands/functioncmds.c
+++ b/src/backend/commands/functioncmds.c
@@ -829,7 +829,7 @@ compute_function_attributes(ParseState *pstate,
 		if (*procost <= 0)
 			ereport(ERROR,
 					(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-					 errmsg("COST must be positive")));
+					 errmsg("COST must be greater than zero")));
 	}
 	if (rows_item)
 	{
@@ -837,7 +837,7 @@ compute_function_attributes(ParseState *pstate,
 		if (*prorows <= 0)
 			ereport(ERROR,
 					(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-					 errmsg("ROWS must be positive")));
+					 errmsg("ROWS must be greater than zero")));
 	}
 	if (support_item)
 		*prosupport = interpret_func_support(support_item);
diff --git a/src/backend/tsearch/wparser_def.c b/src/backend/tsearch/wparser_def.c
index 559dff6355..36b24d3aea 100644
--- a/src/backend/tsearch/wparser_def.c
+++ b/src/backend/tsearch/wparser_def.c
@@ -2598,7 +2598,7 @@ prsd_headline(PG_FUNCTION_ARGS)
 		if (min_words <= 0)
 			ereport(ERROR,
 					(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-					 errmsg("MinWords should be positive")));
+					 errmsg("MinWords should be greater than zero")));
 		if (shortword < 0)
 			ereport(ERROR,
 					(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-- 
2.27.0

