[PATCH] pgbench: fix incorrect long option name in error message - Mailing list pgsql-hackers

From Semih Doğan
Subject [PATCH] pgbench: fix incorrect long option name in error message
Date
Msg-id CALOtZ7tuWisV=v0cUY_q6PLHJ-fOiQ7ZN476JwmM0PyV0t5i7Q@mail.gmail.com
Whole thread
List pgsql-hackers
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
Attachment

pgsql-hackers by date:

Previous
From: Dmitry Fomin
Date:
Subject: Re: [PATCH v1 0/7] Wait event timing and tracing instrumentation
Next
From: Jeff Davis
Date:
Subject: Re: REASSIGN OWNED vs. relisshared dep on !relisshared