git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4e17e32)
Fix reporting of missing or invalid command line arguments in pg_rewind.
Tue, 7 Apr 2015 20:28:28 +0000 (23:28 +0300)
Tue, 7 Apr 2015 20:28:28 +0000 (23:28 +0300)
pg_fatal never returns, so a multi-line message cannot be printed by
calling it twice.

Michael Paquier and Fujii Masao


diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index 04d6a464323ea38fa9104e71cf577476cd49c088..93341a3c8348a5375980030150fb5b143cd0661a 100644 (file)
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -157,21 +157,21 @@ main(int argc, char **argv)
/* No source given? Show usage */
if (datadir_source == NULL && connstr_source == NULL)
{
- pg_fatal("no source specified (--source-pgdata or --source-server)\n");
- pg_fatal("Try \"%s --help\" for more information.\n", progname);
+ fprintf(stderr, _("no source specified (--source-pgdata or --source-server)\n"));
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(1);
}
if (datadir_target == NULL)
{
- pg_fatal("no target data directory specified (--target-pgdata)\n");
+ fprintf(stderr, _("no target data directory specified (--target-pgdata)\n"));
fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(1);
}
if (argc != optind)
{
- pg_fatal("%s: invalid arguments\n", progname);
+ fprintf(stderr, _("invalid arguments\n"));
fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(1);
}
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /