Postgres superuser priviledges
От | Konstantinos Vassiliadis |
---|---|
Тема | Postgres superuser priviledges |
Дата | |
Msg-id | Pine.LNX.3.95.980721115137.27222A-100000@p05.cs.man.ac.uk обсуждение исходный текст |
Список | 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
В списке pgsql-general по дате отправления: