mirror of
https://github.com/postgres/postgres.git
synced 2025-10-16 17:07:43 +03:00
pg_dump: Add --no-publications option
Author: Michael Paquier <michael.paquier@gmail.com>
This commit is contained in:
@@ -166,6 +166,7 @@ dumpOptionsFromRestoreOptions(RestoreOptions *ropt)
|
||||
|
||||
dopt->disable_dollar_quoting = ropt->disable_dollar_quoting;
|
||||
dopt->dump_inserts = ropt->dump_inserts;
|
||||
dopt->no_publications = ropt->no_publications;
|
||||
dopt->no_security_labels = ropt->no_security_labels;
|
||||
dopt->no_subscriptions = ropt->no_subscriptions;
|
||||
dopt->lockWaitTimeout = ropt->lockWaitTimeout;
|
||||
@@ -2792,6 +2793,10 @@ _tocEntryRequired(TocEntry *te, teSection curSection, RestoreOptions *ropt)
|
||||
if (ropt->aclsSkip && _tocEntryIsACL(te))
|
||||
return 0;
|
||||
|
||||
/* If it's a publication, maybe ignore it */
|
||||
if (ropt->no_publications && strcmp(te->desc, "PUBLICATION") == 0)
|
||||
return 0;
|
||||
|
||||
/* If it's security labels, maybe ignore it */
|
||||
if (ropt->no_security_labels && strcmp(te->desc, "SECURITY LABEL") == 0)
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user