diff options
author | Bruce Momjian <bruce@momjian.us> | 2013-07-01 12:40:02 -0400 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2013-07-01 12:40:33 -0400 |
commit | 06b804377cc5628f24ff37de719995a65f6f5928 (patch) | |
tree | 66275f1b91b23d54afbe2825d447222be6051afa /src | |
parent | 031cc55bbea6b3a6b67c700498a78fb1d4399476 (diff) | |
download | postgresql-06b804377cc5628f24ff37de719995a65f6f5928.tar.gz postgresql-06b804377cc5628f24ff37de719995a65f6f5928.zip |
Remove undocumented -h (help) option
The -h option was not supported by many tools, and not documented, so
remove them for consistency from pg_upgrade, pg_test_fsync, and
pg_test_timing.
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/pg_ctl/pg_ctl.c | 5 | ||||
-rw-r--r-- | src/bin/psql/startup.c | 2 |
2 files changed, 3 insertions, 4 deletions
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); |