Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions src/bin/pg_dump/pg_dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -2191,20 +2191,24 @@ selectDumpableType(TypeInfo *tyinfo, Archive *fout)
* Mark a function as to be dumped or not
*/
static void
selectDumpableFunction(FuncInfo *finfo)
selectDumpableFunction(FuncInfo *finfo, Archive *fout)
{
if (checkExtensionMembership(&finfo->dobj, fout))
return; /* extension membership overrides all else */

/*
* If specific functions are being dumped, dump just those functions; else, dump
* according to the parent namespace's dump flag if parent namespace is not null;
* else, always dump the function.
*/
if (function_include_oids.head != NULL)
finfo->dobj.dump = simple_oid_list_member(&function_include_oids,
finfo->dobj.catId.oid);
finfo->dobj.catId.oid) ?
DUMP_COMPONENT_ALL : DUMP_COMPONENT_NONE;
else if (finfo->dobj.namespace)
finfo->dobj.dump = finfo->dobj.namespace->dobj.dump;
finfo->dobj.dump = finfo->dobj.namespace->dobj.dump_contains;
else
finfo->dobj.dump = true;
finfo->dobj.dump = DUMP_COMPONENT_ALL;
}

/*
Expand Down Expand Up @@ -7299,8 +7303,7 @@ getFuncs(Archive *fout, int *numFuncs)
finfo[i].postponed_def = false; /* might get set during sort */

/* Decide whether we want to dump it */
selectDumpableFunction(&finfo[i]);
selectDumpableObject(&(finfo[i].dobj), fout);
selectDumpableFunction(&finfo[i], fout);

/* Mark whether function has an ACL */
if (!PQgetisnull(res, i, i_proacl))
Expand Down
Loading