Re: ALTER OBJECT any_name SET SCHEMA name

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: ALTER OBJECT any_name SET SCHEMA name
Дата
Msg-id 218.1288479570@sss.pgh.pa.us
обсуждение исходный текст
Ответ на ALTER OBJECT any_name SET SCHEMA name  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Ответы Re: ALTER OBJECT any_name SET SCHEMA name  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Re: ALTER OBJECT any_name SET SCHEMA name  (Bernd Helmle <mailings@oopsware.de>)
Список pgsql-hackers
Dimitri Fontaine <dimitri@2ndQuadrant.fr> writes:
> As soon as we have that ability, we are able to provide for relocatable
> extensions with the following command:

>   ALTER EXTENSION ext SET SCHEMA name;
>   ALTER EXTENSION ext SET SCHEMA foo TO bar;

> I think that would end the open debate about search_path vs extension,
> because each user would be able to relocate his local extensions easily,
> wherever the main script has installed them (often enough, public).

I'm not sure whether that really fixes anything, or just provides people
with a larger-caliber foot-gun.  See for example recent complaints about
citext misbehaving if it's not in the public schema (or more generally,
any schema not in the search path).  I think we'd need to think a bit
harder about the behavior of objects that aren't in the search path
before creating a facility like this, since it seems to be tantamount
to promising that extensions won't break when pushed around to different
schemas.

I'm also a bit less than enthused about the implementation approach.
If we're going to have a policy that every object type must support
ALTER SET SCHEMA, I think it might be time to refactor, rather than
copying-and-pasting similar boilerplate code for every one.
        regards, tom lane


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

Предыдущее
От: Dimitri Fontaine
Дата:
Сообщение: ALTER OBJECT any_name SET SCHEMA name
Следующее
От: Greg Stark
Дата:
Сообщение: Re: Hash support for arrays