Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fov4u-0005a9-Hx for pgsql-general@arkaria.postgresql.org; Sun, 12 Aug 2018 18:27:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fov4s-0001rn-8B for pgsql-general@arkaria.postgresql.org; Sun, 12 Aug 2018 18:26:58 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fov4r-0001rg-Sh for pgsql-general@lists.postgresql.org; Sun, 12 Aug 2018 18:26:58 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fov4k-0006l5-Nt for pgsql-general@postgresql.org; Sun, 12 Aug 2018 18:26:56 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w7CIQm5h031922; Sun, 12 Aug 2018 14:26:48 -0400 From: Tom Lane To: TalGloz cc: pgsql-general@postgresql.org Subject: Re: PostgreSQL C Language Extension with C++ Code In-reply-to: <1534097342417-0.post@n3.nabble.com> References: <1534093538827-0.post@n3.nabble.com> <1534097342417-0.post@n3.nabble.com> Comments: In-reply-to TalGloz message dated "Sun, 12 Aug 2018 11:09:02 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <31920.1534098408.1@sss.pgh.pa.us> Date: Sun, 12 Aug 2018 14:26:48 -0400 Message-ID: <31921.1534098408@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk TalGloz 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