Re: Loading shared object files into Postgres

Поиск
Список
Период
Сортировка
От Gene Selkov, Jr.
Тема Re: Loading shared object files into Postgres
Дата
Msg-id 35AF6D51.38B1E5EE@mcs.anl.gov
обсуждение исходный текст
Ответ на Loading shared object files into Postgres  (Konstantinos Vassiliadis <vassilik@p22.cs.man.ac.uk>)
Список pgsql-general
Konstantinos Vassiliadis wrote:
>
> Do I have to be the Postgres "superuser" in order to be able to load a
> shared object file (just like you need to have "superuser" priviledges in
> order to register C functions with Postgres)?
>

It sure is the same thing (from the manpage on load):
-----------------
If a file is not loaded using the load command, the file will be loaded
automatically the first time the function is called by Postgres. Load
can also be used to reload an object file if it has been edited and
recompiled. Only objects created from C language files are supported at
this time.
-----------------

Your guess on Postgres superuser privileges may be right. It always
worked fine for me, but I never used postgres as anyone other than
postgres (for updates) and nobody (for selects). You can use createuser
to give yourself superuser privileges in postgres (see INTERACTIVE
QUESTIONS) in "man createuser".

Other than that, did you modify the source in tutorial? Did you check
the backend logfile? The error message you reported is too generic. By
the way, if you will ever want to debug your extension, there is
virtually no other way than using fprintf(stderr, ...) or opening a file
and writing into it from inside the code.

--Gene

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

Предыдущее
От: Konstantinos Vassiliadis
Дата:
Сообщение: Loading shared object files into Postgres
Следующее
От: eric@gateway.ctlno.com
Дата:
Сообщение: Re: [GENERAL] concatenation of string literals