Re: SQL objects UNITs (was: Extension Templates S03E11)

Поиск
Список
Период
Сортировка
От Cédric Villemain
Тема Re: SQL objects UNITs (was: Extension Templates S03E11)
Дата
Msg-id 201312191432.36396.cedric@2ndquadrant.fr
обсуждение исходный текст
Ответ на Re: SQL objects UNITs (was: Extension Templates S03E11)  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Le jeudi 19 décembre 2013 14:01:17, Robert Haas a écrit :
> On Wed, Dec 18, 2013 at 10:05 AM, Alvaro Herrera
>
> <alvherre@2ndquadrant.com> wrote:
> > Stephen Frost escribió:
> >> * Dimitri Fontaine (dimitri@2ndQuadrant.fr) wrote:
> >> > Basically with building `UNIT` we realise with hindsight that we
> >> > failed to build a proper `EXTENSION` system, and we send that message
> >> > to our users.
> >>
> >> Little difficult to draw conclusions about what out 'hindsight' will
> >> look like.
> >
> > I haven't been keeping very close attention to this, but I fail to see
> > why extensions are so much of a failure.  Surely we can invent a new
> > "kind" of extensions, ones whose contents specifically are dumped by
> > pg_dump.  Regular extensions, the kind we have today, still wouldn't,
> > but we could have a flag, say "CREATE EXTENSION ... (WITH DUMP)" or
> > something.  That way you don't have to come up with UNIT at all (or
> > whatever).  A whole new set of catalogs just to fix up a minor issue
> > with extensions sounds a bit too much to me; we can just add this new
> > thing on top of the existing infrastructure.
>
> Yep.
>
> I'm not very convinced that extensions are a failure.  I've certainly
> had plenty of good experiences with them, and I think others have as
> well, so I believe Dimitri's allegation that we've somehow failed here
> is overstated.  That having been said, having a flag we can set to
> dump the extension contents normally rather than just dumping a CREATE
> EXTENSION statement seems completely reasonable to me.
>
> ALTER EXTENSION foo SET (dump_members = true/false);
>
> It's even got use cases outside of what Dimitri wants to do, like
> dumping and restoring an extension that you've manually modified
> without losing your changes.


Isn't there some raw SQL extension author are supposed to be able to push in
order to dump partial configuration table and similar things (well, what we're
supposed to be able to change in an extension).

yes, it is:
SELECT pg_catalog.pg_extension_config_dump('my_config', 'WHERE NOT
standard_entry');

(it is raw SQL here, but it is not appreciated for Extension 'Templates' ....
I stopped trying to figure/undertand many arguments in those Extension email
threads)

Maybe something around that to have also the objects created by extension
dumped, and we're done. I even wnder if Dimitri has not already a patch for
that based on the work done for Extensions feature.

--
Cédric Villemain +33 (0)6 20 30 22 52
http://2ndQuadrant.fr/
PostgreSQL: Support 24x7 - Développement, Expertise et Formation

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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: SQL objects UNITs
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: GIN improvements part 1: additional information