From 6242ea3e2827d23831dd1be92d2c39c36f7f55e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Semih=20Do=C4=9Fan?= Date: Wed, 15 Jul 2026 21:12:58 +0300 Subject: [PATCH] Fix incorrect long option name in pgbench error message The error message for an invalid -c value referred to the long option as --clients, but the actual option is --client. Fix the message and the TAP test that asserted the wrong spelling. --- src/bin/pgbench/pgbench.c | 2 +- src/bin/pgbench/t/002_pgbench_no_server.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c index 90d22e1..5862758 100644 --- a/src/bin/pgbench/pgbench.c +++ b/src/bin/pgbench/pgbench.c @@ -6865,7 +6865,7 @@ main(int argc, char **argv) break; case 'c': benchmarking_option_set = true; - if (!option_parse_int(optarg, "-c/--clients", 1, INT_MAX, + if (!option_parse_int(optarg, "-c/--client", 1, INT_MAX, &nclients)) { exit(1); diff --git a/src/bin/pgbench/t/002_pgbench_no_server.pl b/src/bin/pgbench/t/002_pgbench_no_server.pl index e694e9e..0e8d92f 100644 --- a/src/bin/pgbench/t/002_pgbench_no_server.pl +++ b/src/bin/pgbench/t/002_pgbench_no_server.pl @@ -92,7 +92,7 @@ my @options = ( [ 'too many scripts', '-S ' x 129, [qr{at most 128 SQL scripts}] ], [ 'bad #clients', '-c three', - [qr{invalid value "three" for option -c/--clients}] + [qr{invalid value "three" for option -c/--client}] ], [ 'bad #threads', '-j eleven', -- 2.43.0.windows.1