Alvaro Herrera <alvherre@commandprompt.com> writes:
> Hmm, seeing the amount of new includes in extension.c, I wonder if it'd
> be better to move AlterExtensionNamespace to alter.c.
It was mainly missing includes cleanup. The guts of the function is now
so short I can inline it in this mail:
targetObjects = listDependentObjects(object);
for (i = 0; i < targetObjects->numrefs; i++)
{
ObjectAddress *thisobj = targetObjects->refs + i;
elog(DEBUG1, "SET SCHEMA on %u: %s",
thisobj->objectId, getObjectDescription(thisobj));
AlterObjectNamespace_internal(thisobj, nspOid);
}
So really, I don't think moving it to alter.c would do any better,
considering that you would then have this file include dependency
related function.
Please find attached v3 patch with #include cleanup.
--
Dimitri Fontaine
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support