Re: Inaccurate error message when set fdw batch_size to 0 - Mailing list pgsql-hackers

From Bharath Rupireddy
Subject Re: Inaccurate error message when set fdw batch_size to 0
Date
Msg-id CALj2ACUNX4dVQ4N0qo4xMtueT5vtSUuwEKUozpfypKy3G4ipiw@mail.gmail.com
Whole thread Raw
In response to Re: Inaccurate error message when set fdw batch_size to 0  (Fujii Masao <masao.fujii@oss.nttdata.com>)
Responses Re: Inaccurate error message when set fdw batch_size to 0  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
List pgsql-hackers
On Wed, May 19, 2021 at 5:20 PM Fujii Masao <masao.fujii@oss.nttdata.com> wrote:
>
>                                 ereport(ERROR,
>                                                 (errcode(ERRCODE_SYNTAX_ERROR),
> -                                                errmsg("%s requires a non-negative numeric value",
> +                                                errmsg("%s must be greater than or equal to zero",
>                                                                 def->defname)));
>                 }
>                 else if (strcmp(def->defname, "extensions") == 0)
> @@ -142,7 +142,7 @@ postgres_fdw_validator(PG_FUNCTION_ARGS)
>                         if (fetch_size <= 0)
>                                 ereport(ERROR,
>                                                 (errcode(ERRCODE_SYNTAX_ERROR),
> -                                                errmsg("%s requires a non-negative integer value",
> +                                                errmsg("%s must be greater than zero",
>
> 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.

With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com

Attachment

pgsql-hackers by date:

Previous
From: Yura Sokolov
Date:
Subject: Add PortalDrop in exec_execute_message
Next
From: Laurenz Albe
Date:
Subject: Commitfest app vs. pgsql-docs