pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: TalGloz <glozmantal@gmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: PostgreSQL C Language Extension with C++ Code
Date: Sun, 12 Aug 2018 14:26:48 -0400
Message-ID: <31921.1534098408@sss.pgh.pa.us> (raw)
In-Reply-To: <1534097342417-0.post@n3.nabble.com>
References: <1534093538827-0.post@n3.nabble.com>
	<CA+FnnTzH1gZ8o4a_WTD79kk7CNUzFu0NHUmbs03Gax0Su4Lgzw@mail.gmail.com>
	<1534097342417-0.post@n3.nabble.com>

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




view thread (10+ messages)  latest in thread

Message-ID: <31921.1534098408@sss.pgh.pa.us>
Permalink:  ../31921.1534098408@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/31921.1534098408@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, glozmantal@gmail.com
  Subject: Re: PostgreSQL C Language Extension with C++ Code
  In-Reply-To: <31921.1534098408@sss.pgh.pa.us>
  References: <1534093538827-0.post@n3.nabble.com> <CA+FnnTzH1gZ8o4a_WTD79kk7CNUzFu0NHUmbs03Gax0Su4Lgzw@mail.gmail.com> <1534097342417-0.post@n3.nabble.com> <31921.1534098408@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox