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

Commitee075fc

Browse files
committed
Fix reporting of missing or invalid command line arguments in pg_rewind.
pg_fatal never returns, so a multi-line message cannot be printed bycalling it twice.Michael Paquier and Fujii Masao
1 parent4e17e32 commitee075fc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎src/bin/pg_rewind/pg_rewind.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,21 +157,21 @@ main(int argc, char **argv)
157157
/* No source given? Show usage */
158158
if (datadir_source==NULL&&connstr_source==NULL)
159159
{
160-
pg_fatal("no source specified (--source-pgdata or --source-server)\n");
161-
pg_fatal("Try \"%s --help\" for more information.\n",progname);
160+
fprintf(stderr,_("no source specified (--source-pgdata or --source-server)\n"));
161+
fprintf(stderr,_("Try \"%s --help\" for more information.\n"),progname);
162162
exit(1);
163163
}
164164

165165
if (datadir_target==NULL)
166166
{
167-
pg_fatal("no target data directory specified (--target-pgdata)\n");
167+
fprintf(stderr,_("no target data directory specified (--target-pgdata)\n"));
168168
fprintf(stderr,_("Try \"%s --help\" for more information.\n"),progname);
169169
exit(1);
170170
}
171171

172172
if (argc!=optind)
173173
{
174-
pg_fatal("%s:invalid arguments\n",progname);
174+
fprintf(stderr,_("invalid arguments\n"));
175175
fprintf(stderr,_("Try \"%s --help\" for more information.\n"),progname);
176176
exit(1);
177177
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp