Re: postgres functions and C++

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: postgres functions and C++
Дата
Msg-id 3332.970673388@sss.pgh.pa.us
обсуждение исходный текст
Ответ на postgres functions and C++  ("Vladimir V. Zolotych" <gsmith@eurocom.od.ua>)
Список pgsql-hackers
"Vladimir V. Zolotych" <gsmith@eurocom.od.ua> writes:
>   my=> select days_in_month(3, 3, 3);
>   ERROR: Can't find function days_in_month in file /tmp/days.so

Try using 'nm' to see what symbol name is actually being exported
from the .so file.  I suspect that despite your use of extern "C",
your C++ compiler is being uncooperative and is naming the function
in some strange fashion at the link level.

There is an option in CREATE FUNCTION to specify the link symbol
name separately from the SQL name of the function, so if you can't
get your compiler to play nice you could still get it to work by
quoting whatever nm tells you...
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Ashley Cambrell
Дата:
Сообщение: Re: Version data type. - DONE
Следующее
От: darcy@druid.net (D'Arcy J.M. Cain)
Дата:
Сообщение: WaitOnLock