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

Commit614ce64

Browse files
committed
pg_restore: Error about incompatible options
This mirrors the equivalent error cases in pg_dump.
1 parent3682025 commit614ce64

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

‎src/bin/pg_dump/pg_restore.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,20 @@ main(int argc, char **argv)
314314
opts->useDB=1;
315315
}
316316

317+
if (opts->dataOnly&&opts->schemaOnly)
318+
{
319+
fprintf(stderr,_("%s: options -s/--schema-only and -a/--data-only cannot be used together\n"),
320+
progname);
321+
exit_nicely(1);
322+
}
323+
324+
if (opts->dataOnly&&opts->dropSchema)
325+
{
326+
fprintf(stderr,_("%s: options -c/--clean and -a/--data-only cannot be used together\n"),
327+
progname);
328+
exit_nicely(1);
329+
}
330+
317331
/* Can't do single-txn mode with multiple connections */
318332
if (opts->single_txn&&numWorkers>1)
319333
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp