aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_dump/pg_restore.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/pg_dump/pg_restore.c')
-rw-r--r--src/bin/pg_dump/pg_restore.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/bin/pg_dump/pg_restore.c b/src/bin/pg_dump/pg_restore.c
index 5be06930e2d..c426189f927 100644
--- a/src/bin/pg_dump/pg_restore.c
+++ b/src/bin/pg_dump/pg_restore.c
@@ -377,6 +377,8 @@ main(int argc, char **argv)
AH = OpenArchive(inputFileSpec, opts->format);
+ SetArchiveOptions(AH, NULL, opts);
+
/*
* We don't have a connection yet but that doesn't matter. The connection
* is initialized to NULL and if we terminate through exit_nicely() while
@@ -393,7 +395,7 @@ main(int argc, char **argv)
AH->exit_on_error = opts->exit_on_error;
if (opts->tocFile)
- SortTocFromFile(AH, opts);
+ SortTocFromFile(AH);
/* See comments in pg_dump.c */
#ifdef WIN32
@@ -408,10 +410,10 @@ main(int argc, char **argv)
AH->numWorkers = numWorkers;
if (opts->tocSummary)
- PrintTOCSummary(AH, opts);
+ PrintTOCSummary(AH);
else
{
- SetArchiveRestoreOptions(AH, opts);
+ ProcessArchiveRestoreOptions(AH);
RestoreArchive(AH);
}
@@ -423,7 +425,7 @@ main(int argc, char **argv)
/* AH may be freed in CloseArchive? */
exit_code = AH->n_errors ? 1 : 0;
- CloseArchive(AH, NULL);
+ CloseArchive(AH);
return exit_code;
}