[PATCH] pgbench: fix incorrect long option name in error message
Hi hackers,
While experimenting with pgbench I passed a non-numeric value to -c
and got:
pgbench -c abc
pgbench: error: invalid value "abc" for option -c/--clients
The message refers to --clients, but no such option exists -- the
actual long option is --client (singular), as shown in --help and in
the documentation. Following the message's suggestion fails:
pgbench --clients=10
pgbench: illegal option -- clients
All the sibling option_parse_int() calls in pgbench.c spell the
option name correctly (-j/--jobs, -T/--time, ...); this one looks
like a simple typo. I verified it is present on master and in
released versions (18.4).
The attached patch fixes the message and updates the TAP test in
002_pgbench_no_server.pl that was asserting the wrong spelling.
Regards,
Semih Doğan
Attachments:
0001-Fix-incorrect-long-option-name-in-pgbench-error-mess.patchapplication/octet-stream; name=0001-Fix-incorrect-long-option-name-in-pgbench-error-mess.patchDownload+2-3
On 15 Jul 2026, at 20:30, Semih Doğan <semih702do@gmail.com> wrote:
The attached patch fixes the message and updates the TAP test in
002_pgbench_no_server.pl that was asserting the wrong spelling.
Good catch, the same typo exists all the way down to v15 from 6f164e6d17616.
Thanks for the report, I'll apply and backpatch shortly.
--
Daniel Gustafsson