Re: Attention PL authors: want to be listed in template table? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Attention PL authors: want to be listed in template table?
Date
Msg-id 19328.1126029623@sss.pgh.pa.us
Whole thread Raw
In response to Re: Attention PL authors: want to be listed in template table?  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Attention PL authors: want to be listed in template table?
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> So your proposal is to enable a new language by doing:

> 1. register a template
> 2. activate template using CREATE LANGUAGE (which would copy it to 
> pg_language)

That's the long-term idea, yes.

> How is this different from

> 1. register language in pg_language without privileges
> 2. activate language by granting privileges

Because you can't create a language without first creating the support
procedures, which ordinarily requires having the shared library present.
(This is why I proposed text names for the support procedures in
pltemplate, rather than OID references.)  This is perhaps not an issue
for entries wired in by initdb, but it's definitely an issue for manual
addition of template entries.

Also, ISTM your proposal is to cause "CREATE LANGUAGE foo" on an
already-existing language to execute "GRANT USAGE ON LANGUAGE foo TO PUBLIC"
instead, rather than erroring out.  That doesn't seem to pass the
least-surprise test at all.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Mysteriously lost values in nodes
Next
From: Martijn van Oosterhout
Date:
Subject: Re: Mysteriously lost values in nodes