@ -1302,7 +1302,7 @@ checkExtensionMembership(DumpableObject *dobj, Archive *fout)
/*
/*
* In 9.6 and above , mark the member object to have any non - initial ACL ,
* In 9.6 and above , mark the member object to have any non - initial ACL ,
* policies , and security labl es dumped .
* policies , and security label s dumped .
*
*
* Note that any initial ACLs ( see pg_init_privs ) will be removed when we
* Note that any initial ACLs ( see pg_init_privs ) will be removed when we
* extract the information about the object . We don ' t provide support for
* extract the information about the object . We don ' t provide support for
@ -1324,8 +1324,8 @@ checkExtensionMembership(DumpableObject *dobj, Archive *fout)
dobj - > dump = DUMP_COMPONENT_NONE ;
dobj - > dump = DUMP_COMPONENT_NONE ;
else
else
dobj - > dump = ext - > dobj . dump_contains & ( DUMP_COMPONENT_ACL |
dobj - > dump = ext - > dobj . dump_contains & ( DUMP_COMPONENT_ACL |
DUMP_COMPONENT_SECLABEL | DUMP_COMPONENT_POLICY ) ;
DUMP_COMPONENT_SECLABEL |
DUMP_COMPONENT_POLICY ) ;
}
}
return true ;
return true ;
@ -1338,15 +1338,11 @@ checkExtensionMembership(DumpableObject *dobj, Archive *fout)
static void
static void
selectDumpableNamespace ( NamespaceInfo * nsinfo , Archive * fout )
selectDumpableNamespace ( NamespaceInfo * nsinfo , Archive * fout )
{
{
if ( checkExtensionMembership ( & nsinfo - > dobj , fout ) )
return ; /* extension membership overrides all else */
/*
/*
* If specific tables are being dumped , do not dump any complete
* If specific tables are being dumped , do not dump any complete
* namespaces . If specific namespaces are being dumped , dump just those
* namespaces . If specific namespaces are being dumped , dump just those
* namespaces . Otherwise , dump all non - system namespaces .
* namespaces . Otherwise , dump all non - system namespaces .
*/
*/
if ( table_include_oids . head ! = NULL )
if ( table_include_oids . head ! = NULL )
nsinfo - > dobj . dump_contains = nsinfo - > dobj . dump = DUMP_COMPONENT_NONE ;
nsinfo - > dobj . dump_contains = nsinfo - > dobj . dump = DUMP_COMPONENT_NONE ;
else if ( schema_include_oids . head ! = NULL )
else if ( schema_include_oids . head ! = NULL )
@ -1355,18 +1351,21 @@ selectDumpableNamespace(NamespaceInfo *nsinfo, Archive *fout)
nsinfo - > dobj . catId . oid ) ?
nsinfo - > dobj . catId . oid ) ?
DUMP_COMPONENT_ALL : DUMP_COMPONENT_NONE ;
DUMP_COMPONENT_ALL : DUMP_COMPONENT_NONE ;
else if ( fout - > remoteVersion > = 90600 & &
else if ( fout - > remoteVersion > = 90600 & &
strncmp ( nsinfo - > dobj . name , " pg_catalog " ,
strcmp ( nsinfo - > dobj . name , " pg_catalog " ) = = 0 )
strlen ( " pg_catalog " ) ) = = 0 )
{
/*
/*
* In 9.6 and above , we dump out any ACLs defined in pg_catalog , if
* In 9.6 and above , we dump out any ACLs defined in pg_catalog , if
* they are interesting ( and not the original ACLs which were set at
* they are interesting ( and not the original ACLs which were set at
* initdb time , see pg_init_privs ) .
* initdb time , see pg_init_privs ) .
*/
*/
nsinfo - > dobj . dump_contains = nsinfo - > dobj . dump = DUMP_COMPONENT_ACL ;
nsinfo - > dobj . dump_contains = nsinfo - > dobj . dump = DUMP_COMPONENT_ACL ;
}
else if ( strncmp ( nsinfo - > dobj . name , " pg_ " , 3 ) = = 0 | |
else if ( strncmp ( nsinfo - > dobj . name , " pg_ " , 3 ) = = 0 | |
strcmp ( nsinfo - > dobj . name , " information_schema " ) = = 0 )
strcmp ( nsinfo - > dobj . name , " information_schema " ) = = 0 )
{
/* Other system schemas don't get dumped */
nsinfo - > dobj . dump_contains = nsinfo - > dobj . dump = DUMP_COMPONENT_NONE ;
nsinfo - > dobj . dump_contains = nsinfo - > dobj . dump = DUMP_COMPONENT_NONE ;
}
else
else
nsinfo - > dobj . dump_contains = nsinfo - > dobj . dump = DUMP_COMPONENT_ALL ;
nsinfo - > dobj . dump_contains = nsinfo - > dobj . dump = DUMP_COMPONENT_ALL ;
@ -1377,6 +1376,15 @@ selectDumpableNamespace(NamespaceInfo *nsinfo, Archive *fout)
simple_oid_list_member ( & schema_exclude_oids ,
simple_oid_list_member ( & schema_exclude_oids ,
nsinfo - > dobj . catId . oid ) )
nsinfo - > dobj . catId . oid ) )
nsinfo - > dobj . dump_contains = nsinfo - > dobj . dump = DUMP_COMPONENT_NONE ;
nsinfo - > dobj . dump_contains = nsinfo - > dobj . dump = DUMP_COMPONENT_NONE ;
/*
* If the schema belongs to an extension , allow extension membership to
* override the dump decision for the schema itself . However , this does
* not change dump_contains , so this won ' t change what we do with objects
* within the schema . ( If they belong to the extension , they ' ll get
* suppressed by it , otherwise not . )
*/
( void ) checkExtensionMembership ( & nsinfo - > dobj , fout ) ;
}
}
/*
/*