Re: Help with adding C-Language Functions
| От | Tom Lane |
|---|---|
| Тема | Re: Help with adding C-Language Functions |
| Дата | |
| Msg-id | 27779.1108056673@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Help with adding C-Language Functions (Seamus Thomas Carroll <carrolls@cpsc.ucalgary.ca>) |
| Ответы |
Re: Help with adding C-Language Functions
|
| Список | pgsql-interfaces |
Seamus Thomas Carroll <carrolls@cpsc.ucalgary.ca> writes:
> I changed my file from BlackboardFunctions.c to all lowercase,
> blackboardfunctions.c, and the database now finds the add_one function.
I'm betting that the actual sequence of events was more like this:
CREATE FUNCTION f1(...) as '/home/.../BlackboardFunctions' ...;[ test f1, it works, cool ][ add add_one to C source
file,recompile ]CREATE FUNCTION add_one(...) as '/home/.../BlackboardFunctions' ...;[ fails ][ rename file ]CREATE
FUNCTIONadd_one(...) as '/home/.../blackboardfunctions' ...;[ works ]
The reason the second try didn't work is that an existing backend will
not re-load an already loaded .so file, unless you force it to with the
LOAD command. It doesn't notice that you've modified the file. Had you
started a fresh session, things would have worked, too.
regards, tom lane
В списке pgsql-interfaces по дате отправления: