Enhanced error/help message for pg_controldata.
Serguei Mokhov
This commit is contained in:
parent
2d140d35a4
commit
c9967a4909
@ -6,7 +6,7 @@
|
|||||||
* copyright (c) Oliver Elphick <olly@lfix.co.uk>, 2001;
|
* copyright (c) Oliver Elphick <olly@lfix.co.uk>, 2001;
|
||||||
* licence: BSD
|
* licence: BSD
|
||||||
*
|
*
|
||||||
* $Header: /cvsroot/pgsql/src/bin/pg_controldata/pg_controldata.c,v 1.7 2002/10/18 22:05:35 petere Exp $
|
* $Header: /cvsroot/pgsql/src/bin/pg_controldata/pg_controldata.c,v 1.8 2003/01/08 22:26:34 momjian Exp $
|
||||||
*/
|
*/
|
||||||
#include "postgres.h"
|
#include "postgres.h"
|
||||||
|
|
||||||
@ -25,9 +25,20 @@
|
|||||||
static void
|
static void
|
||||||
usage(const char *progname)
|
usage(const char *progname)
|
||||||
{
|
{
|
||||||
printf(_("%s displays PostgreSQL database cluster control information.\n\n"), progname);
|
printf
|
||||||
printf(_("Usage:\n %s [DATADIR]\n\n"), progname);
|
(
|
||||||
printf(_("If not data directory is specified, the environment variable PGDATA\nis used.\n\n"));
|
_(
|
||||||
|
"Usage:\n"
|
||||||
|
" %s [OPTION]\n\n"
|
||||||
|
"Options:\n"
|
||||||
|
" DATADIR show cluster control information for DATADIR\n"
|
||||||
|
" -?, --help display this help and exit\n"
|
||||||
|
" -V, --version display pg_controldata's version and exit\n\n"
|
||||||
|
),
|
||||||
|
progname
|
||||||
|
);
|
||||||
|
printf(_("%s displays PostgreSQL database cluster control information.\n"), progname);
|
||||||
|
printf(_("If no data directory is specified, the environment variable PGDATA\nis used.\n\n"));
|
||||||
printf(_("Report bugs to <pgsql-bugs@postgresql.org>.\n"));
|
printf(_("Report bugs to <pgsql-bugs@postgresql.org>.\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,6 +108,7 @@ main(int argc, char *argv[])
|
|||||||
if (DataDir == NULL)
|
if (DataDir == NULL)
|
||||||
{
|
{
|
||||||
fprintf(stderr, _("%s: no data directory specified\n"), progname);
|
fprintf(stderr, _("%s: no data directory specified\n"), progname);
|
||||||
|
fprintf(stderr, _("Try '%s --help' for more information.\n"), progname);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user