mirror of
https://github.com/postgres/postgres.git
synced 2025-10-16 17:07:43 +03:00
pg_dump: Add --no-subscriptions option
Author: Michael Paquier <michael.paquier@gmail.com> Reviewed-by: Petr Jelinek <petr.jelinek@2ndquadrant.com>
This commit is contained in:
@@ -167,6 +167,7 @@ dumpOptionsFromRestoreOptions(RestoreOptions *ropt)
|
||||
dopt->disable_dollar_quoting = ropt->disable_dollar_quoting;
|
||||
dopt->dump_inserts = ropt->dump_inserts;
|
||||
dopt->no_security_labels = ropt->no_security_labels;
|
||||
dopt->no_subscriptions = ropt->no_subscriptions;
|
||||
dopt->lockWaitTimeout = ropt->lockWaitTimeout;
|
||||
dopt->include_everything = ropt->include_everything;
|
||||
dopt->enable_row_security = ropt->enable_row_security;
|
||||
@@ -2795,6 +2796,10 @@ _tocEntryRequired(TocEntry *te, teSection curSection, RestoreOptions *ropt)
|
||||
if (ropt->no_security_labels && strcmp(te->desc, "SECURITY LABEL") == 0)
|
||||
return 0;
|
||||
|
||||
/* If it's a subcription, maybe ignore it */
|
||||
if (ropt->no_subscriptions && strcmp(te->desc, "SUBSCRIPTION") == 0)
|
||||
return 0;
|
||||
|
||||
/* Ignore it if section is not to be dumped/restored */
|
||||
switch (curSection)
|
||||
{
|
||||
|
Reference in New Issue
Block a user