Re: postgres_fdw - should we tighten up batch_size, fetch_size options against non-numeric values?
| От | Fujii Masao |
|---|---|
| Тема | Re: postgres_fdw - should we tighten up batch_size, fetch_size options against non-numeric values? |
| Дата | |
| Msg-id | 8ca543af-4164-08e2-4496-2c05690886db@oss.nttdata.com обсуждение исходный текст |
| Ответ на | Re: postgres_fdw - should we tighten up batch_size, fetch_size options against non-numeric values? (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>) |
| Ответы |
Re: postgres_fdw - should we tighten up batch_size, fetch_size options against non-numeric values?
|
| Список | pgsql-hackers |
On 2021/05/20 1:01, Bharath Rupireddy wrote:
> Thanks for the comments. I added separate messages, changed the error
> code from ERRCODE_SYNTAX_ERROR to ERRCODE_INVALID_PARAMETER_VALUE and
> also quoted the option name in the error message. PSA v3 patch.
Thanks for updating the patch!
+ (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
+ errmsg("invalid numeric value for option \"%s\"",
+ def->defname)));
In reloptions.c, when parse_real() fails to parse the input, the error message
"invalid value for floating point option..." is output.
For the sake of consistency, we should use the same error message here?
- (errcode(ERRCODE_SYNTAX_ERROR),
- errmsg("%s requires a non-negative integer value",
+ (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
+ errmsg("invalid integer value for option \"%s\"",
IMO the error message should be "invalid value for integer option..." here
because of the same reason I told above. Thought?
Regards,
--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION
В списке pgsql-hackers по дате отправления: