Re: [GENERAL] Postgres superuser priviledges - Mailing list pgsql-general

From Gene Selkov, Jr.
Subject Re: [GENERAL] Postgres superuser priviledges
Date
Msg-id 35B4B4ED.4FB3D5B8@mcs.anl.gov
Whole thread Raw
In response to Postgres superuser priviledges  (Konstantinos Vassiliadis <vassilik@p05.cs.man.ac.uk>)
Responses Re: [NOVICE] Re: [GENERAL] Postgres superuser priviledges  (Konstantinos Vassiliadis <vassilik@p05.cs.man.ac.uk>)
Re: [NOVICE] Re: [GENERAL] Postgres superuser priviledges  (Konstantinos Vassiliadis <vassilik@p05.cs.man.ac.uk>)
Re: [GENERAL] Postgres superuser priviledges  (Konstantinos Vassiliadis <vassilik@p05.cs.man.ac.uk>)
List pgsql-general
Konstantinos Vassiliadis wrote:
>
> 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.

There more than one thing that can go wrong. You are welcome to send me
your c source and sql to create the type. I will check.

> Can somebody help me? Anybody used Postgres under Linux Red Hat before?

That's how is used most often, I think. You could also try to build one
of my own extensions, found at

    http://wit.mcs.anl.gov/~selkovjr/

ec-type.tgz is the easiest of these.


Gene

pgsql-general by date:

Previous
From: Matt McClure
Date:
Subject: Re: [GENERAL] returning oid of last insert?
Next
From: Ken McGlothlen
Date:
Subject: Re: [GENERAL] Re: [HACKERS] [Fwd: SGVLLUG Oracle and Informix on Linux]