Re: Extensions versus pg_upgrade

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Extensions versus pg_upgrade
Дата
Msg-id 108.1297219702@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Extensions versus pg_upgrade  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Extensions versus pg_upgrade
Re: Extensions versus pg_upgrade
Re: Extensions versus pg_upgrade
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> ... And you could even allow multiple objects:
> ALTER EXTENSION extension_name ADD object-description [, ...];
> Which might be handy.

I just thought of a different way of coming at the question, which might
help us make a choice.

Like ALTER THING SET SCHEMA, ALTER THING SET EXTENSION is implicitly
assuming that there can be only one owning extension for an object.
Furthermore, it's not really intended for *removal* of an object from an
extension (a concept that doesn't even exist for SET SCHEMA).  We could
take a page from COMMENT ON and use "SET EXTENSION NULL" for that, but
that's surely more of a hack than anything else.

In contrast, ALTER EXTENSION ADD doesn't presuppose that you couldn't
add the object to multiple extensions; and it has a natural inverse,
ALTER EXTENSION DROP.  I am not necessarily suggesting that we will ever
allow either of those things, but I do suggest that we should pick a
syntax that doesn't look like it's being forced to conform if we ever
want to do it.  The DROP case at least seems like it might be wanted
in the relatively near future.

So that looks to me like a fairly good argument for the ADD syntax.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Extensions versus pg_upgrade
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Extensions versus pg_upgrade