Re: Quick Extensions Question - Mailing list pgsql-hackers

From Dimitri Fontaine
Subject Re: Quick Extensions Question
Date
Msg-id m2hbbkyxpi.fsf@2ndQuadrant.fr
Whole thread Raw
In response to Re: Quick Extensions Question  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Open unmatch source file when step into parse_analyze() in Eclipse?
Next
From: Robert Haas
Date:
Subject: Re: Quick Extensions Question