Re: PostgreSQL C Language Extension with C++ Code - Mailing list pgsql-general

From Tom Lane
Subject Re: PostgreSQL C Language Extension with C++ Code
Date
Msg-id 31921.1534098408@sss.pgh.pa.us
Whole thread Raw
In response to Re: PostgreSQL C Language Extension with C++ Code  (TalGloz <glozmantal@gmail.com>)
Responses Re: PostgreSQL C Language Extension with C++ Code
List 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 by date:

Previous
From: TalGloz
Date:
Subject: Re: PostgreSQL C Language Extension with C++ Code
Next
From: TalGloz
Date:
Subject: Re: PostgreSQL C Language Extension with C++ Code