Re: DROP EXTENSION - Mailing list pgsql-docs

From Alvaro Herrera
Subject Re: DROP EXTENSION
Date
Msg-id 20160621165725.GA89052@alvherre.pgsql
Whole thread Raw
In response to Re: DROP EXTENSION  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: DROP EXTENSION
List 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 by date:

Previous
From: Michael Paquier
Date:
Subject: Re: DROP EXTENSION
Next
From: Alvaro Herrera
Date:
Subject: Re: DROP EXTENSION