From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
Cc: | mschwan(at)opentext(dot)com, pgsql-docs(at)postgresql(dot)org |
Subject: | Re: DROP EXTENSION |
Date: | 2016-06-21 18:13:01 |
Message-ID: | 20160621181301.GA91352@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
Alvaro Herrera wrote:
> Michael Paquier wrote:
> > On Tue, Jun 21, 2016 at 1:00 AM, <mschwan(at)opentext(dot)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.
Right; mschwan wrote private email to indicate that the function in
question is:
CREATE OR REPLACE FUNCTION public.f_unaccent(text)
RETURNS text AS
$$
select public.unaccent('public.unaccent', $1)
$$
LANGUAGE sql IMMUTABLE;
so when the unaccent extension is dropped, this function remains (of
course) but it stops working.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-06-21 18:26:49 | Re: DROP EXTENSION |
Previous Message | Alvaro Herrera | 2016-06-21 16:57:25 | Re: DROP EXTENSION |