Tom Lane <tgl@sss.pgh.pa.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