Re: Loading shared object files into Postgres

From: "Gene Selkov, Jr(dot)" <selkovjr(at)mcs(dot)anl(dot)gov>
To: Konstantinos Vassiliadis <vassilik(at)p22(dot)cs(dot)man(dot)ac(dot)uk>, pgsql-general(at)postgreSQL(dot)org
Subject: Re: Loading shared object files into Postgres
Date: 1998-07-17 15:27:13
Message-ID: 35AF6D51.38B1E5EE@mcs.anl.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Kurt Seel 1998-07-17 15:27:31 concatenation of string literals
Previous Message J. Christopher Bower 1998-07-17 15:25:36 Porting from 6.1 to 6.3.2 - 6.1 pgdump Segv Fault