Re: PostgreSQL C Language Extension with C++ Code

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: PostgreSQL C Language Extension with C++ Code
Дата
Msg-id 31921.1534098408@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: PostgreSQL C Language Extension with C++ Code  (TalGloz <glozmantal@gmail.com>)
Ответы Re: PostgreSQL C Language Extension with C++ Code  (TalGloz <glozmantal@gmail.com>)
Список pgsql-general
TalGloz <glozmantal@gmail.com> writes:
> The error this time for PostgreSQL is:
> *ERROR:  could not find function information for function "sum_of_numbers"
> HINT:  SQL-callable functions need an accompanying
> PG_FUNCTION_INFO_V1(funcname).
> SQL state: 42883*

Probably need extern "C" around the PG_FUNCTION_INFO_V1 macro, too.
Both those macros produce C function definitions under the hood,
and said functions need to not be name-mangled by C++.

            regards, tom lane


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

Предыдущее
От: TalGloz
Дата:
Сообщение: Re: PostgreSQL C Language Extension with C++ Code
Следующее
От: TalGloz
Дата:
Сообщение: Re: PostgreSQL C Language Extension with C++ Code