mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-02-05 19:09:58 +08:00
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;
|
||||
* 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"
|
||||
|
||||
@ -25,9 +25,20 @@
|
||||
static void
|
||||
usage(const char *progname)
|
||||
{
|
||||
printf(_("%s displays PostgreSQL database cluster control information.\n\n"), progname);
|
||||
printf(_("Usage:\n %s [DATADIR]\n\n"), progname);
|
||||
printf(_("If not data directory is specified, the environment variable PGDATA\nis used.\n\n"));
|
||||
printf
|
||||
(
|
||||
_(
|
||||
"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"));
|
||||
}
|
||||
|
||||
@ -97,6 +108,7 @@ main(int argc, char *argv[])
|
||||
if (DataDir == NULL)
|
||||
{
|
||||
fprintf(stderr, _("%s: no data directory specified\n"), progname);
|
||||
fprintf(stderr, _("Try '%s --help' for more information.\n"), progname);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user