Re: ALTER OBJECT any_name SET SCHEMA name - Mailing list pgsql-hackers

From Dimitri Fontaine
Subject Re: ALTER OBJECT any_name SET SCHEMA name
Date
Msg-id m2oca4hzgx.fsf@2ndQuadrant.fr
Whole thread Raw
In response to Re: ALTER OBJECT any_name SET SCHEMA name  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: ALTER OBJECT any_name SET SCHEMA name
List pgsql-hackers
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


Attachment

pgsql-hackers by date:

Previous
From: Dimitri Fontaine
Date:
Subject: Re: ALTER OBJECT any_name SET SCHEMA name
Next
From: Shigeru HANADA
Date:
Subject: Re: SQL/MED estimated time of arrival?