Re: Quick Extensions Question

From: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>, "David E(dot) Wheeler" <david(at)kineticode(dot)com>, pgsql-hackers Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Quick Extensions Question
Date: 2011-03-03 16:29:13
Message-ID: m2hbbkyxpi.fsf@2ndQuadrant.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> Not sure it's that easy. I think DROP LANGUAGE can't assume that the
> language it's been told to drop is extension-ified. (Even if we do this

If CREATE LANGUAGE creates an extension of the same name, then DROP
LANGUAGE can assume that there's an extension of the same name, right?

> for all the core ones, there are a dozen non-core ones that might not
> all get with the program right away.) How do we make this work in a way
> that covers both cases, but doesn't turn DROP LANGUAGE into a security
> hole that lets non-superusers drop random extensions?

We could check that the extension named the same as the language only
contains one object of class pg_language.

> It may all work pretty easily, but I'm still caffeine-deprived so I'm
> not sure ...

It does not look like a big deal to me either. If you don't have the
time too, I could propose a patch.

Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-03-03 16:30:55 Re: Quick Extensions Question
Previous Message Heikki Linnakangas 2011-03-03 16:26:59 Re: Open unmatch source file when step into parse_analyze() in Eclipse?