Re: Inaccurate error message when set fdw batch_size to 0
От
Kyotaro Horiguchi
Тема
Re: Inaccurate error message when set fdw batch_size to 0
Дата
Msg-id
20210520.171410.397269392203102426.horikyota.ntt@gmail.com
Ответ на
Re: Inaccurate error message when set fdw batch_size to 0 (Bharath Rupireddy)
Список
Дерево обсуждения
Inaccurate error message when set fdw batch_size to 0 "houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>
Re: Inaccurate error message when set fdw batch_size to 0 Dilip Kumar <dilipbalaut@gmail.com>
RE: Inaccurate error message when set fdw batch_size to 0 "tsunakawa.takay@fujitsu.com" <tsunakawa.takay@fujitsu.com>
Re: Inaccurate error message when set fdw batch_size to 0 Fujii Masao <masao.fujii@oss.nttdata.com>
Re: Inaccurate error message when set fdw batch_size to 0 Tom Lane <tgl@sss.pgh.pa.us>
Re: Inaccurate error message when set fdw batch_size to 0 Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Inaccurate error message when set fdw batch_size to 0 Tom Lane <tgl@sss.pgh.pa.us>
Re: Inaccurate error message when set fdw batch_size to 0 Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Inaccurate error message when set fdw batch_size to 0 Amit Kapila <amit.kapila16@gmail.com>
Re: Inaccurate error message when set fdw batch_size to 0 Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Inaccurate error message when set fdw batch_size to 0 Fujii Masao <masao.fujii@oss.nttdata.com>
Re: Inaccurate error message when set fdw batch_size to 0 Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Inaccurate error message when set fdw batch_size to 0 Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: Inaccurate error message when set fdw batch_size to 0 Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Inaccurate error message when set fdw batch_size to 0 Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Inaccurate error message when set fdw batch_size to 0 Fujii Masao <masao.fujii@oss.nttdata.com>
Re: Inaccurate error message when set fdw batch_size to 0 Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Inaccurate error message when set fdw batch_size to 0 Fujii Masao <masao.fujii@oss.nttdata.com>
Re: Inaccurate error message when set fdw batch_size to 0 Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Inaccurate error message when set fdw batch_size to 0 Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Inaccurate error message when set fdw batch_size to 0 Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Inaccurate error message when set fdw batch_size to 0 Fujii Masao <masao.fujii@oss.nttdata.com>
Re: Inaccurate error message when set fdw batch_size to 0 Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Inaccurate error message when set fdw batch_size to 0 Fujii Masao <masao.fujii@oss.nttdata.com>
Re: Inaccurate error message when set fdw batch_size to 0 Michael Paquier <michael@paquier.xyz>
At Wed, 19 May 2021 21:48:56 +0530, Bharath Rupireddy wrote in
> On Wed, May 19, 2021 at 5:20 PM Fujii Masao wrote:
> > I'm fine to convert "non-negative" word to "greater than" or "greater than
> > or equal to" in the messages. But this change also seems to get rid of
> > the information about the data type of the option from the message.
> > I'm not sure if this is an improvement. Probably isn't it better to
> > convert "requires a non-negative integer value" to "must be an integer value
> > greater than zero"?
>
> Thanks for the comments. Done that way. PSA v3 patch.
--- a/src/backend/utils/adt/tsquery_op.c
+++ b/src/backend/utils/adt/tsquery_op.c
@@ -121,7 +121,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 greater than or equal to zero and less than %d",
MAXENTRYPOS)));
Though it is not due to this patch, but the message looks wrong. The condition is suggesting:
"distance in phrase operator must be an integer value greater than or equal to zero and less than or equal to %d"
I'm not sure readers can read it without biting their tongue. How
about something like the following instead?
"distance in phrase operator must be an integer value between zero and
%d inclusive."
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
В списке pgsql-hackers по дате отправления
От: tanghy.fnst@fujitsu.com
Дата:
От: Dave Page
Дата: