Re: ALTER OBJECT any_name SET SCHEMA name

Поиск
Список
Период
Сортировка
От Dimitri Fontaine
Тема Re: ALTER OBJECT any_name SET SCHEMA name
Дата
Msg-id m2oca4hzgx.fsf@2ndQuadrant.fr
обсуждение исходный текст
Ответ на Re: ALTER OBJECT any_name SET SCHEMA name  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: ALTER OBJECT any_name SET SCHEMA name  (Alvaro Herrera <alvherre@commandprompt.com>)
Список 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


Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Dimitri Fontaine
Дата:
Сообщение: Re: ALTER OBJECT any_name SET SCHEMA name
Следующее
От: Shigeru HANADA
Дата:
Сообщение: Re: SQL/MED estimated time of arrival?