mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-06 15:24:56 +08:00
Suppress foreign data wrappers and foreign servers in partial dumps
This is consistent with the behavior of other global objects such as languages and extensions. Omitting foreign servers also omits the respective user mappings.
This commit is contained in:
parent
2367da886d
commit
3001b76308
@ -11180,6 +11180,14 @@ dumpForeignDataWrapper(Archive *fout, FdwInfo *fdwinfo)
|
||||
if (!fdwinfo->dobj.dump || dataOnly)
|
||||
return;
|
||||
|
||||
/*
|
||||
* FDWs that belong to an extension are dumped based on their "dump" field.
|
||||
* Otherwise omit them if we are only dumping some specific object.
|
||||
*/
|
||||
if (!fdwinfo->dobj.ext_member)
|
||||
if (!include_everything)
|
||||
return;
|
||||
|
||||
q = createPQExpBuffer();
|
||||
delq = createPQExpBuffer();
|
||||
labelq = createPQExpBuffer();
|
||||
@ -11255,7 +11263,7 @@ dumpForeignServer(Archive *fout, ForeignServerInfo *srvinfo)
|
||||
char *fdwname;
|
||||
|
||||
/* Skip if not to be dumped */
|
||||
if (!srvinfo->dobj.dump || dataOnly)
|
||||
if (!srvinfo->dobj.dump || dataOnly || !include_everything)
|
||||
return;
|
||||
|
||||
q = createPQExpBuffer();
|
||||
|
Loading…
Reference in New Issue
Block a user