Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit06b8043

Browse files
committed
Remove undocumented -h (help) option
The -h option was not supported by many tools, and not documented, soremove them for consistency from pg_upgrade, pg_test_fsync, andpg_test_timing.
1 parent031cc55 commit06b8043

File tree

4 files changed

+5
-8
lines changed

4 files changed

+5
-8
lines changed

‎contrib/pg_test_fsync/pg_test_fsync.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,7 @@ handle_args(int argc, char *argv[])
146146

147147
if (argc>1)
148148
{
149-
if (strcmp(argv[1],"--help")==0||strcmp(argv[1],"-h")==0||
150-
strcmp(argv[1],"-?")==0)
149+
if (strcmp(argv[1],"--help")==0||strcmp(argv[1],"-?")==0)
151150
{
152151
printf("Usage: %s [-f FILENAME] [-s SECS-PER-TEST]\n",progname);
153152
exit(0);

‎contrib/pg_test_timing/pg_test_timing.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ handle_args(int argc, char *argv[])
4949

5050
if (argc>1)
5151
{
52-
if (strcmp(argv[1],"--help")==0||strcmp(argv[1],"-h")==0||
53-
strcmp(argv[1],"-?")==0)
52+
if (strcmp(argv[1],"--help")==0||strcmp(argv[1],"-?")==0)
5453
{
5554
printf("Usage: %s [-d DURATION]\n",progname);
5655
exit(0);

‎src/bin/pg_ctl/pg_ctl.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2002,13 +2002,12 @@ main(int argc, char **argv)
20022002
/* support --help and --version even if invoked as root */
20032003
if (argc>1)
20042004
{
2005-
if (strcmp(argv[1],"-h")==0||strcmp(argv[1],"--help")==0||
2006-
strcmp(argv[1],"-?")==0)
2005+
if (strcmp(argv[1],"--help")==0||strcmp(argv[1],"-?")==0)
20072006
{
20082007
do_help();
20092008
exit(0);
20102009
}
2011-
elseif (strcmp(argv[1],"-V")==0||strcmp(argv[1],"--version")==0)
2010+
elseif (strcmp(argv[1],"--version")==0||strcmp(argv[1],"-V")==0)
20122011
{
20132012
puts("pg_ctl (PostgreSQL) "PG_VERSION);
20142013
exit(0);

‎src/bin/psql/startup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ parse_psql_options(int argc, char *argv[], struct adhoc_opts * options)
558558
break;
559559
case'?':
560560
/* Actual help option given */
561-
if (strcmp(argv[optind-1],"-?")==0||strcmp(argv[optind-1],"--help")==0)
561+
if (strcmp(argv[optind-1],"--help")==0||strcmp(argv[optind-1],"-?")==0)
562562
{
563563
usage();
564564
exit(EXIT_SUCCESS);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp