Re: PostgreSQL C Language Extension with C++ Code

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: TalGloz <glozmantal(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PostgreSQL C Language Extension with C++ Code
Date: 2018-08-12 18:26:48
Message-ID: 31921.1534098408@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

TalGloz <glozmantal(at)gmail(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message TalGloz 2018-08-12 18:40:02 Re: PostgreSQL C Language Extension with C++ Code
Previous Message TalGloz 2018-08-12 18:09:02 Re: PostgreSQL C Language Extension with C++ Code