Dynamic loading of C functions

From: "Jasbinder Bali" <jsbali(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Dynamic loading of C functions
Date: 2006-06-20 19:54:29
Message-ID: a47902760606201254u6ea102bev23acc7d328542004@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I've written a function in C, compiled it and trying to use the same
function in one of my postgres functions like this:

CREATE FUNCTION add_one(integer) RETURNS integer
AS '/usr/include/pgsql/server/test_func, 'add_one'
LANGUAGE C STRICT

test_func is the name of my object file and add_one is the name of
the function i want to call from test_func.c C file.

I get the follwing error
ERROR: could not access file "/usr/include/pgsql/server/test_func": No such
file or directory

/usr/include/pgsql/server/ is exactly the path where test_func object file
resides.
Don't know why isn't postgres able to find it there.

Any kind of help would be appreciated.

~Jas

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ricardo Vaz 2006-06-20 19:58:26 Copy from text file
Previous Message Aaron Koning 2006-06-20 19:44:24 Re: Exporting data from view