diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2015-04-07 23:28:28 +0300 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2015-04-07 23:28:28 +0300 |
commit | ee075fcb130f834bd5913940b97ad53fd4d21e93 (patch) | |
tree | b99624884f6d5995d201ad9163fb365a20cdc018 /src | |
parent | 4e17e32f53c2de4a862ee5ef8bdcfa9152c11e25 (diff) | |
download | postgresql-ee075fcb130f834bd5913940b97ad53fd4d21e93.tar.gz postgresql-ee075fcb130f834bd5913940b97ad53fd4d21e93.zip |
Fix reporting of missing or invalid command line arguments in pg_rewind.
pg_fatal never returns, so a multi-line message cannot be printed by
calling it twice.
Michael Paquier and Fujii Masao
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/pg_rewind/pg_rewind.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 04d6a464323..93341a3c834 100644 --- 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); } |