Re: Quick Extensions Question - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Quick Extensions Question
Date
Msg-id 8572.1299168150@sss.pgh.pa.us
Whole thread Raw
In response to Re: Quick Extensions Question  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Quick Extensions Question
List pgsql-hackers
[ slightly more awake now ... ]

I wrote:
> 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
> for all the core ones, there are a dozen non-core ones that might not
> all get with the program right away.)

No, wait, that's nonsense.  With what you're talking about, there would
never be a non-extension-ified language, because CREATE LANGUAGE would
force it to be attached to an extension.  So maybe that problem isn't
so hard after all.

However, what *is* looking a bit hard is dump/restore behavior.  By
default, pg_dump would proceed to dump an installed language as a CREATE
EXTENSION command, and that would fail on restore, especially if you
were trying to restore as non superuser.  The behavior of
--binary-upgrade would be differently unpleasant: it would make the
extension, then try to CREATE LANGUAGE, and that would fail because the
extension name already exists.  No doubt we could kluge those behaviors
too, but it's starting to look pretty messy.

On the whole I'd rather spend time trying to fix the real problem, which
is allowing CREATE EXTENSION to non-superusers.  The general case of
that looks quite hard to me, but maybe we could get something that works
for the single case of an extension containing just a language.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Quick Extensions Question
Next
From: Greg Stark
Date:
Subject: Re: Mark deprecated operators as such in their comments?