Re: transforms

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: transforms
Дата
Msg-id 51377BE0.70309@gmx.net
обсуждение исходный текст
Ответ на Re: transforms  (Josh Berkus <josh@agliodbs.com>)
Ответы Re: transforms  (Josh Berkus <josh@agliodbs.com>)
Re: transforms  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Список pgsql-hackers
On 3/5/13 5:52 PM, Josh Berkus wrote:
> More on this: the problem appears to be that the symbols for hstore are
> loaded only if I've just just created the extension in that database:

I see.  This is a problem with any kind of dynamically loadable module
that uses another module.  The other module is only loaded either at
creation time or when a function from it is first used (or if a preload
mechanism is used).

At run time, this will sort itself out, because all the required modules
will be loaded.  The problem is when you create the "glue" extension and
haven't invoked any code from any of the dependent extension in the
session.  Abstractly, the possible solutions are either not to check the
functions when the extension is created (possibly settable by a flag) or
to somehow force a load of all dependent extensions when the new
extension is created.  (I say extension here even though dynamically
loadable modules are attached to functions, which makes this even more
confusing.)

In "normal" programming languages, this is normally addressed by placing
explicit load/require/import statements before you do anything else.
What we are doing here is more like an autoload functionality that some
environments have.  Those have the same problem.




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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Support for REINDEX CONCURRENTLY
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: Optimizing pglz compressor