Hi Chao,

On Fri, Nov 27, 2026 Chao Li wrote:
> option_parse_int() doesn't handle whitespace-only strings properly. It
treats them as 0.

Thanks for the patch. I applied v1 on master (3b249c728f) and built pg_dump.

Before the patch, pg_dump --extra-float-digits= and --extra-float-digits="
" are accepted and go on to connect. After it, both fail with: invalid
value "" / " " for option --extra-float-digits. "+", "-", "5x" and "x" are
rejected before and after, and " 5" / "5 " still hit the range error, so
nothing else changes.

The endptr == optarg check looks right to me, and it doesn't depend on
strtol() setting EINVAL. I ran the binary by hand; I did not run the new
TAP tests through the test harness.

Regards,
Sai Pranav

Reply via email to