Re: [NOVICE] Re: [GENERAL] Postgres superuser priviledges

From: Konstantinos Vassiliadis <vassilik(at)p05(dot)cs(dot)man(dot)ac(dot)uk>
To: "Gene Selkov, Jr(dot)" <selkovjr(at)mcs(dot)anl(dot)gov>
Cc: pgsql-general(at)postgreSQL(dot)org, pgsql-novice(at)postgreSQL(dot)org
Subject: Re: [NOVICE] Re: [GENERAL] Postgres superuser priviledges
Date: 1998-07-21 17:56:21
Message-ID: Pine.LNX.3.95.980721184410.28715A-400000@p05.cs.man.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks in advance for your help.
I had a look at your defined type. I have some questions:
a) I don't really understand the syntax of the Makefile. I understand it
is required to do the job and I simply substituted your files with mine.
b) Do I need to place my directory with all the files under $PGROOT/src/
where $PGROOT is the postgres directory?

I have issued
%make
from the directory where all my files are and gave
make: *** ..: Is a directory. Stop.

I attach the C source, the SQL definitions and my Makefile.
Thanks again
Kostas

On Tue, 21 Jul 1998, Gene Selkov, Jr. wrote:

> 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
>
>

Attachment Content-Type Size
phone.c text/plain 1.9 KB
phone.sql text/plain 654 bytes
Makefile text/plain 353 bytes

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Doug Younger 1998-07-21 18:31:02 Encrypting Data Requests (& returns)?
Previous Message Ken McGlothlen 1998-07-21 17:32:47 Re: [GENERAL] Re: [HACKERS] [Fwd: SGVLLUG Oracle and Informix on Linux]