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: [GENERAL] Postgres superuser priviledges |
Date: | 1998-07-21 19:29:58 |
Message-ID: | Pine.LNX.3.95.980721202459.29672D-100000@p05.cs.man.ac.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi again
The server that PostgreSQL resides is a Sun running SunOS 4.1.x. The
client is a Red Hat Linux. I think I need to compile the C source for the
target platform (i.e. SunOS 4.1.x) is that right?
Anyway, I assumed this is right so I compiled
gcc -I$PGROOT/include -I$PGROOT/src/include -c phone.c
and then
% make
gave error Makefile:19***missing operator
On the other hand, if I compile under Red Hat Linux
gcc -I$PGROOT/include -I$PGROOT/src/include -c phone.c
and then
% make
gave error make: Fatal error in reader:../Makefile.global, line 54:
Unexpected end of line seen.
Which option (target or Red Hat)? Then why error in either?
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
>
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 1998-07-21 19:30:05 | Re: [GENERAL] Re: [HACKERS] [Fwd: SGVLLUG Oracle and Informix on Linux] |
Previous Message | Bruce Momjian | 1998-07-21 19:02:45 | Re: [GENERAL] returning oid of last insert? |