Postgres superuser priviledges

From: Konstantinos Vassiliadis <vassilik(at)p05(dot)cs(dot)man(dot)ac(dot)uk>
To: pgsql-general(at)postgresql(dot)org, pgsql-novice(at)postgresql(dot)org
Subject: Postgres superuser priviledges
Date: 1998-07-21 11:06:00
Message-ID: Pine.LNX.3.95.980721115137.27222A-100000@p05.cs.man.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi
I am new to Postgres. I am trying to load a C function in Postgres under
Red Hat Linux.
I compile using
gcc -I$PGROOT -I$PGROOT/include -I$PGROOT/src/include -c phone.c
to produce the object file 'phone.o'
Then I link using
ld -Bdynamic -o phone.so phone.o -lc
to produce the shared object 'phone.so'.
(Assuming I am doing things right so far) Then from psql:

=> CREATE FUNCTION phone_in(opaque)
RETURNS phone
AS '/home/M97/acs/vassilik/protein/phone.so'
LANGUAGE 'c';
NOTICE: ProcedureCreate: type 'phone' is not yet defined
CREATE

Same for the output function, the type itself and a table that uses the
type.
Then
test=> INSERT INTO test_phone VALUES ('01483-827294','0161-2242394');
PQexec() -- Request was sent to backend, but backend closed the channel
before responding.
This probably means the backend terminated abnormally before or
while processing the request.

Why???????????????????
Initially, I thought it's because I did not have superuser priviledges.
However, if I didn't I would not be able to issue CREATE FUNCTION for a C
function ( I had this problem in the past and I had the system
administrator change my entry in the pg_user table so that the attribute
'usesuper' is set to true).

I get the same message from PQexec() when typing
test=> load '/home/M97/acs/vassilik/protein/phone.so';

I think there is something wrong with the flags I used during compilation
or linkediting (I even tried to create a Makefile as somebody suggested to
me but I still had the same problems)

Can somebody help me? Anybody used Postgres under Linux Red Hat before?
I really need to know because I am stuck at this and cannot proceed with
my project.
Kostas

Responses

Browse pgsql-general by date

  From Date Subject
Next Message The Hermit Hacker 1998-07-21 12:06:51 Re: [HACKERS] [Fwd: SGVLLUG Oracle and Informix on Linux]
Previous Message Przemyslaw Bak 1998-07-21 09:45:22 Do you receive my e-mail ?