Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pvgAG-0007HP-PK for pgsql-hackers@arkaria.postgresql.org; Sun, 07 May 2023 15:19:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pvgAE-0000wh-OQ for pgsql-hackers@arkaria.postgresql.org; Sun, 07 May 2023 15:19:06 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pvgAE-0000wY-FI for pgsql-hackers@lists.postgresql.org; Sun, 07 May 2023 15:19:06 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pvgAB-0012sv-9Y for pgsql-hackers@postgresql.org; Sun, 07 May 2023 15:19:05 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 347FIwFo050313; Sun, 7 May 2023 11:18:58 -0400 From: Tom Lane To: "=?utf-8?B?55uP5LiA?=" cc: "=?utf-8?B?cGdzcWwtaGFja2Vycw==?=" Subject: Re: Proposal for Prototype Implementation to Enhance C/C++ Interoperability in PostgreSQL In-reply-to: References: Comments: In-reply-to "=?utf-8?B?55uP5LiA?=" message dated "Sun, 07 May 2023 14:48:14 +0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <50311.1683472738.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 07 May 2023 11:18:58 -0400 Message-ID: <50312.1683472738@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "=3D?utf-8?B?55uP5LiA?=3D" writes: > The proposed implementation can significantly improve the interoperabili= ty between C and C++ code in PostgreSQL. It allows for seamless integratio= n of C++ code with PostgreSQL, without the need for complex workarounds or= modifications to the existing codebase. That'd be nice to have, certainly ... > I have submitted the implementation on [GitHub](https://github.com/= postgres/postgres/commit/1a9a2790430f256d9d0cc371249e43769d93eb8e#diff-6b6= 034caa00ddf38f641cbd10d5a5d1bb7135f8b23c5a879e9703bd11bd8240f). I would ap= preciate it if you could review the implementation and provide feedback. ... but I think this patch has no hope of being adequately portable. It seems extremely specific to one particular C++ implementation (unless you can show that every single thing you've used here is in the C++ standard), and then for good measure you've thrown in a new dependency on pthreads. On top of that, doesn't this require us to move our minimum language requirement to C++-something? We just barely got done deciding C99 was okay to use. regards, tom lane