aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/pg_test_fsync/pg_test_fsync.c3
-rw-r--r--contrib/pg_test_timing/pg_test_timing.c3
-rw-r--r--src/bin/pg_ctl/pg_ctl.c5
-rw-r--r--src/bin/psql/startup.c2
4 files changed, 5 insertions, 8 deletions
diff --git a/contrib/pg_test_fsync/pg_test_fsync.c b/contrib/pg_test_fsync/pg_test_fsync.c
index b978d9e44ef..53f600f593d 100644
--- a/contrib/pg_test_fsync/pg_test_fsync.c
+++ b/contrib/pg_test_fsync/pg_test_fsync.c
@@ -146,8 +146,7 @@ handle_args(int argc, char *argv[])
if (argc > 1)
{
- if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-h") == 0 ||
- strcmp(argv[1], "-?") == 0)
+ if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-?") == 0)
{
printf("Usage: %s [-f FILENAME] [-s SECS-PER-TEST]\n", progname);
exit(0);
diff --git a/contrib/pg_test_timing/pg_test_timing.c b/contrib/pg_test_timing/pg_test_timing.c
index 0bf9127e105..e44c535d093 100644
--- a/contrib/pg_test_timing/pg_test_timing.c
+++ b/contrib/pg_test_timing/pg_test_timing.c
@@ -49,8 +49,7 @@ handle_args(int argc, char *argv[])
if (argc > 1)
{
- if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-h") == 0 ||
- strcmp(argv[1], "-?") == 0)
+ if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-?") == 0)
{
printf("Usage: %s [-d DURATION]\n", progname);
exit(0);
diff --git a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.c
index 9045e00a1db..9e909ae77d1 100644
--- a/src/bin/pg_ctl/pg_ctl.c
+++ b/src/bin/pg_ctl/pg_ctl.c
@@ -2002,13 +2002,12 @@ main(int argc, char **argv)
/* support --help and --version even if invoked as root */
if (argc > 1)
{
- if (strcmp(argv[1], "-h") == 0 || strcmp(argv[1], "--help") == 0 ||
- strcmp(argv[1], "-?") == 0)
+ if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-?") == 0)
{
do_help();
exit(0);
}
- else if (strcmp(argv[1], "-V") == 0 || strcmp(argv[1], "--version") == 0)
+ else if (strcmp(argv[1], "--version") == 0 || strcmp(argv[1], "-V") == 0)
{
puts("pg_ctl (PostgreSQL) " PG_VERSION);
exit(0);
diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c
index 1c9f7a568a1..b2264c91fac 100644
--- a/src/bin/psql/startup.c
+++ b/src/bin/psql/startup.c
@@ -558,7 +558,7 @@ parse_psql_options(int argc, char *argv[], struct adhoc_opts * options)
break;
case '?':
/* Actual help option given */
- if (strcmp(argv[optind - 1], "-?") == 0 || strcmp(argv[optind - 1], "--help") == 0)
+ if (strcmp(argv[optind - 1], "--help") == 0 || strcmp(argv[optind - 1], "-?") == 0)
{
usage();
exit(EXIT_SUCCESS);