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:
@@ -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 ||
|
||||
|
Reference in New Issue
Block a user