1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-16 17:07:43 +03:00

pg_restore: Add -N option to exclude schemas

This is similar to the -N option in pg_dump, except that it doesn't take
a pattern, just like the existing -n option in pg_restore.

From: Michael Banck <michael.banck@credativ.de>
This commit is contained in:
Peter Eisentraut
2016-09-20 12:00:00 -04:00
parent 16d1adb35c
commit 46b55e7f85
4 changed files with 30 additions and 2 deletions

View File

@@ -2751,6 +2751,11 @@ _tocEntryRequired(TocEntry *te, teSection curSection, RestoreOptions *ropt)
return 0;
}
if (ropt->schemaExcludeNames.head != NULL
&& te->namespace
&& simple_string_list_member(&ropt->schemaExcludeNames, te->namespace))
return 0;
if (ropt->selTypes)
{
if (strcmp(te->desc, "TABLE") == 0 ||