Re: How to find configuration data in _PG_init()

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: How to find configuration data in _PG_init()
Дата
Msg-id 56E17E75.4020702@aklaver.com
обсуждение исходный текст
Ответ на How to find configuration data in _PG_init()  (<david@andl.org>)
Ответы Re: How to find configuration data in _PG_init()  (<david@andl.org>)
Список pgsql-general
On 03/10/2016 05:24 AM, david@andl.org wrote:
> My language handler requires some configuration information to start up,
> which I would like to get from the file system (but it could be set up
> by an SQL query SET). Currently I’m using hard-coded paths, which
> doesn’t seem like a good solution. Is there perhaps a way to get the
> path that was used to load the DLL? I couldn’t find one in the existing
> language implementations.

There is pg_config:

http://www.postgresql.org/docs/9.5/interactive/app-pgconfig.html

At the moment it is only available from the above command. In 9.6:

http://www.depesz.com/2016/02/29/waiting-for-9-6-add-new-system-view-pg_config/

it also be available in a system view.

There are the following systems catalogs that give you information about
languages:

http://www.postgresql.org/docs/9.5/interactive/catalog-pg-language.html

http://www.postgresql.org/docs/9.5/interactive/catalog-pg-pltemplate.html
http://www.postgresql.org/docs/9.5/interactive/catalog-pg-proc.html

>
> Having got started it then needs to query the database. Is that OK in
> _PG_init()?
>
> Any hints much appreciated.
>
> Regards
>
> David M Bennett FACS
>
> /
> ------------------------------------------------------------------------
> /
>
> /Andl - A New Database Language - andl.org/
>


--
Adrian Klaver
adrian.klaver@aklaver.com


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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Unable to match same value in field.
Следующее
От: rob stone
Дата:
Сообщение: Re: Plan to support predicate push-down into subqueries with aggregates?