| От | Mark R. Will |
|---|---|
| Тема | Problem creating a C function |
| Дата | |
| Msg-id | 002d01c20dbf$2228d090$84b54118@digico1 обсуждение исходный текст |
| Список | pgsql-general |
I've compiled a C routine to be used as a database function on Postgres 7.1.3 installed on RedHat 7.1. No errors or warnings except when I try to add it. I'm using the command: CREATE OR REPLACE FUNCTION myfunc(text,int,int,int) RETURNS text AS '$libdir/libmyfunc.so', 'myfunc' LANGUAGE C; I'm getting the following message: ERROR: Load of file /usr/lib/pgsql/libmyfunc.so failed: /usr/lib/pgsql/libmyfunc.so: undefined symbol: MemoryContextFree I know that MemoryContextFree is called by the pfree() macro, which I call a number of times in the routine. The library libmyfunc.so is definitely in /usr/lib/pgsql and if I specify the absolute path to it in the CREATE command or drop the 'myfunc' bit just before LANGUAGE I still get the exact same message. If it helps any, the source code uses this sequence of includes: #include "postgres.h" #include "executor/executor.h" #include "executor/spi.h" #include <string.h> #include "fmgr.h" Any ideas on what might be happening? Thx. - Mark.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера