Re: Quick Extensions Question

Поиск
Список
Период
Сортировка
От David E. Wheeler
Тема Re: Quick Extensions Question
Дата
Msg-id D81AE2DA-DE59-4C32-936C-B4EE5C95848A@kineticode.com
обсуждение исходный текст
Ответ на Re: Quick Extensions Question  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Quick Extensions Question  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Mar 3, 2011, at 1:31 PM, Tom Lane wrote:

> However, it does strike me that there is one simple case we could
> support without a great deal of sweat.  Namely, what if we allow
> non-superusers to create an extension if all the commands in the script
> are ones they could execute anyway?  In particular, an extension
> containing only CREATE LANGUAGE would work for exactly those users
> who could execute CREATE LANGUAGE under the existing dispensations.
> This might also make it less painful to use extensions that consist
> purely of SQL (no underlying C functions).

Now see here? THAT's what I'm talking about!

> This looks like it would be at most a few hours' work to change,
> and it would enable creation of extensions for the built-in languages
> that can be loaded with the same permissions as before.

Would that time include having extension records for the core PLs, created when you CREATE LANGUAGE and removed when
youDROP LANGUAGE? 

> It would
> not do anything towards allowing non-superusers to load languages that
> aren't listed in pg_pltemplate, but it doesn't make things any worse
> for non-core languages either: they can make extensions that are
> superuser-loadable, which is the same permissions situation they are
> in now.
>
> Comments?

I assume that non-core PLs must be installed by a superuser? And if so, then they could be distributed as extensions
withsuperuser = true? 

I think this is awesome. Love it, especially for SQL-only extensions (of which I expect there will be many in the
comingyears). 

Of course, this doesn't address how to make compile-time options pre-requisites, but I think that's a somewhat less
importantissue, frankly. I can modify the explanation extension install script to throw an exception of xpath isn't
installed,for example. Kind of a PITA, but do-able. 

Best,

David



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Sync Rep v19
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: Quick Extensions Question