Re: in-catalog Extension Scripts and Control parameters (templates?)

Поиск
Список
Период
Сортировка
От Dimitri Fontaine
Тема Re: in-catalog Extension Scripts and Control parameters (templates?)
Дата
Msg-id m2txkjyjb8.fsf@2ndQuadrant.fr
обсуждение исходный текст
Ответ на Re: in-catalog Extension Scripts and Control parameters (templates?)  (Hitoshi Harada <umi.tanuki@gmail.com>)
Ответы Re: in-catalog Extension Scripts and Control parameters (templates?)  (Hitoshi Harada <umi.tanuki@gmail.com>)
Re: in-catalog Extension Scripts and Control parameters (templates?)  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Hi,

Thanks a lot for your review!

Some answers here, new version of the patch with fixes by tuesday.

Hitoshi Harada <umi.tanuki@gmail.com> writes:
> - If I have control file that has the same name as template, create
> extension picks up control file?  Is this by design?

Yes. That should allow to answer most of Heikki's security complaint,
but isn't enough to allow us to open the feature to non superuser if I
understand correctly.

> - Though control file is kind of global information among different
> databases, pg_extension_template is not.  Sounds a little weird to me.

I think that's a limitation of the old model and we don't want to turn
templates for extensions into being shared catalogs. At least that's my
understanding of the design consensus.

> - Why do we need with() clause even if I don't need it?

Will have a fresh look, thanks.

> - I copied and paste from my plv8.control file to template script, and
> MODULE_PATHNAME didn't work.  By design?

Yes. MODULE_PATHNAME is deprecated by the control file parameter of the
same name, and there's no reason to use it in extension templates even
if we got to support C coded extensions in them, which is not the case
now.

> foo=# create template for extension ex2 version '1.0' with (requires ex1)
> as $$ $$;
> ERROR:  template option "requires" takes an argument

Will see about that.

> - create template ex2, create extension ex2, alter template ex2 rename to
> ex3, create extension ex3, drop template ex3;
> foo=# drop template for extension ex3 version '1.0';
> ERROR:  cannot drop unrecognized object 3179 16429 0 because other objects
> depend on it

Well, if I'm following, you're trying to remove a non-existing object. I
guess you would prefer a better error message, right?

> - a template that is created in another template script does not appear to
> depend on the parent template.

I don't think that should be automatically the case, even if I admit I
didn't think about that case.

> - Without control file/template, attempt to create a new extension gives:
> foo=# create extension plv8;
> ERROR:  extension "plv8" has no default control template
> but can it be better, like "extension plv8 has no default control file or
> template"?

Will rework.

> - Do we really need separate tables, pg_extension_template and
> pg_extension_control?

Yes, to be able to have the same feature as we have today with
auxilliary control files, that is change properties of the extension
from a version to the next.

> - Looks like both tables don't have toast tables.  Some experiment gives:
> ERROR:  row is too big: size 8472, maximum size 8160

Will fix in next version of the patch.

Thanks,
-- 
Dimitri Fontaine                                        06 63 07 10 78
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support



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

Предыдущее
От: Chris Farmiloe
Дата:
Сообщение: Re: ASYNC Privileges proposal
Следующее
От: Hitoshi Harada
Дата:
Сообщение: Re: in-catalog Extension Scripts and Control parameters (templates?)