Re: [GENERAL] Trying to make functions in 'C'

selkovjr@mcs.anl.gov

From: selkovjr@mcs.anl.gov
To: "fabian baena" <fabbaena@hotmail.com>, pgsql-general@postgreSQL.org
Date: 1999-05-16T19:24:24Z
Lists: pgsql-general
> I'm tying to learn how to make function in 'C'.
> I'm trying to compile a program I made in 'C'.
> The command I gave were:
> 
> % gcc -fPIC -c addone.c -I/usr/local/pgsql/include
> % ld -G -Bdynamic -o addone.so addone.o
> 
> and created the function in postgres like this:
> 
>          CREATE FUNCTION add_one(int4) RETURNS int4
>               AS './addone.so' LANGUAGE 'c';
                   ^^^^^^^^^^^^^
one must provide an absolute path here

--Gene