From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Jasbinder Bali" <jsbali(at)gmail(dot)com> |
Cc: | "Bill Moran" <wmoran(at)collaborativefusion(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Dynamic loading of C functions |
Date: | 2006-06-20 21:24:15 |
Message-ID: | 911.1150838655@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
"Jasbinder Bali" <jsbali(at)gmail(dot)com> writes:
>>> /usr/include/pgsql/server/ is exactly the path where test_func object
>>> file resides.
Hmmm .... when you say "object file", do you mean it's really named
"test_func.o"?
If so, that's both the wrong name and the wrong type of file. Postgres
is looking for a shared library, eg "test_func.so" (or on some platforms
".sl" or ".dylib"). There's some advice in our manual about the
compiler switches to use to create a shared library, or see your
compiler documentation.
Given AS '/usr/include/pgsql/server/test_func', Postgres will look for
both "test_func" and "test_func.so" (not sure which order, try the LOAD
reference page for details). It won't look for "test_func.o" though.
BTW, most people would say that /usr/include is exactly where NOT to
put an executable file ... conventionally this kind of file goes under
/usr/lib. That's not what's causing your problem, it's just a question
of keeping your filesystem tidy enough to be able to find things again.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Jasbinder Bali | 2006-06-20 21:25:37 | Re: Dynamic loading of C functions |
Previous Message | elein | 2006-06-20 21:21:02 | Re: Dynamic loading of C functions |