Re: Extension Templates S03E11

Поиск
Список
Период
Сортировка
От Dimitri Fontaine
Тема Re: Extension Templates S03E11
Дата
Msg-id m24n6fws04.fsf@2ndQuadrant.fr
обсуждение исходный текст
Ответ на Re: Extension Templates S03E11  (Stephen Frost <sfrost@snowman.net>)
Ответы Re: Extension Templates S03E11
Re: Extension Templates S03E11
Список pgsql-hackers
Hi,

Stephen Frost <sfrost@snowman.net> writes:
> * Jeff Davis (pgsql@j-davis.com) wrote:
>> What is stopping Extension Templates, as proposed, from being this
>> special "extension creation mode"? What would be a better design?
>
> The extra catalog tables which store SQL scripts in text columns is one
> of my main objections to the as-proposed Extension Templates.  I view
> those scripts as a poor man's definition of database objects which are
> defined properly in the catalog already.

I have a very hard time to understand this objection.

PL/SQL functions are just a SQL script stored as-is in the catalogs.
That applies the same way to any other PL language too, with scripts
stored as-is in the catalogs in different languages.

Even views are stored in a textual way in the catalogs, albeit in a
specific pre-processed format, it's still a text blob that could pass
for a script in a backend specific language, parsed by the rewriter.

So while I hear your objection to the "script in catalog" idea Stephen,
I think we should move forward. We don't have the luxury of only
applying patches where no compromise has to be made, where everyone is
fully happy with the solution we find as a community.

>  The other big issue is that
> there isn't an easy way to see how we could open up the ability to
> create extensions to non-superusers with this approach.

The main proposal here is to only allow the owner of a template to
install it as an extension. For superusers, we can implement the needed
SET ROLE command automatically in the CREATE EXTENSION command.

Is there another security issue that this “same role” approach is not
solving? I don't think so.

>> It seems like the porting issue is just a matter of finding someone to
>> write a tool to reliably translate packages from PGXN into a form
>> suitable to be sent using SQL commands; which we would need anyway for
>> this special mode.

I already mentionned that's on my roadmap, part of the vision I'm trying
to implement here. My goal is to deliver the full solution for 9.4, and
this Extension Templates facility is the missing in-core bits of it.

Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Why the buildfarm is all pink
Следующее
От: Florian Pflug
Дата:
Сообщение: Re: same-address mappings vs. relative pointers