Re: DROP EXTENSION

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: DROP EXTENSION
Дата
Msg-id 20160621165725.GA89052@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: DROP EXTENSION  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: DROP EXTENSION  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-docs
Michael Paquier wrote:
> On Tue, Jun 21, 2016 at 1:00 AM,  <mschwan@opentext.com> wrote:
> > Page: https://www.postgresql.org/docs/9.5/static/sql-dropextension.html
> > Description:
> > I dropped an extension in my database with a function dependency.  The
> > function was dropped (without messages of dependencies) and leaving the
> > function intact.
> > The lines "DROP EXTENSION removes extensions from the database. Dropping an
> > extension causes its component objects to be dropped as well." is not clear.
> >  It should be stated that by default the dependencies remain intact after
> > the drop.
>
> I am not following here.

I think the use case involves the user creating a function that depends
on something (probably another function) in the extension.  So you drop
the extension, which drops the function your own function depends on,
but your own function remains in place.

This seems very similar to the use case for which we added the ALTER
OBJECT DEPEND ON EXTENSION (cited below) but not quite the same.
Perhaps mschwan can clarify.

commit f2fcad27d59c8e5c48f8fa0a96c8355e40f24273
Author:     Alvaro Herrera <alvherre@alvh.no-ip.org>
AuthorDate: Tue Apr 5 18:38:54 2016 -0300
CommitDate: Tue Apr 5 18:38:54 2016 -0300

    Support ALTER THING .. DEPENDS ON EXTENSION

    This introduces a new dependency type which marks an object as depending
    on an extension, such that if the extension is dropped, the object
    automatically goes away; and also, if the database is dumped, the object
    is included in the dump output.  Currently the grammar supports this for
    indexes, triggers, materialized views and functions only, although the
    utility code is generic so adding support for more object types is a
    matter of touching the parser rules only.

    Author: Abhijit Menon-Sen
    Reviewed-by: Alexander Korotkov, Álvaro Herrera
    Discussion: http://www.postgresql.org/message-id/20160115062649.GA5068@toroid.org


--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: DROP EXTENSION
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: DROP EXTENSION