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

Commitc9967a4

Browse files
committed
Enhanced error/help message for pg_controldata.
Serguei Mokhov
1 parent2d140d3 commitc9967a4

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

‎src/bin/pg_controldata/pg_controldata.c

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* copyright (c) Oliver Elphick <olly@lfix.co.uk>, 2001;
77
* licence: BSD
88
*
9-
* $Header: /cvsroot/pgsql/src/bin/pg_controldata/pg_controldata.c,v 1.7 2002/10/18 22:05:35 petere Exp $
9+
* $Header: /cvsroot/pgsql/src/bin/pg_controldata/pg_controldata.c,v 1.8 2003/01/08 22:26:34 momjian Exp $
1010
*/
1111
#include"postgres.h"
1212

@@ -25,9 +25,20 @@
2525
staticvoid
2626
usage(constchar*progname)
2727
{
28-
printf(_("%s displays PostgreSQL database cluster control information.\n\n"),progname);
29-
printf(_("Usage:\n %s [DATADIR]\n\n"),progname);
30-
printf(_("If not data directory is specified, the environment variable PGDATA\nis used.\n\n"));
28+
printf
29+
(
30+
_(
31+
"Usage:\n"
32+
" %s [OPTION]\n\n"
33+
"Options:\n"
34+
" DATADIR show cluster control information for DATADIR\n"
35+
" -?, --help display this help and exit\n"
36+
" -V, --version display pg_controldata's version and exit\n\n"
37+
),
38+
progname
39+
);
40+
printf(_("%s displays PostgreSQL database cluster control information.\n"),progname);
41+
printf(_("If no data directory is specified, the environment variable PGDATA\nis used.\n\n"));
3142
printf(_("Report bugs to <pgsql-bugs@postgresql.org>.\n"));
3243
}
3344

@@ -97,6 +108,7 @@ main(int argc, char *argv[])
97108
if (DataDir==NULL)
98109
{
99110
fprintf(stderr,_("%s: no data directory specified\n"),progname);
111+
fprintf(stderr,_("Try '%s --help' for more information.\n"),progname);
100112
exit(1);
101113
}
102114

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp