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 1pZCes-0004Pm-Tf for pgsql-interfaces@arkaria.postgresql.org; Mon, 06 Mar 2023 15:21:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pZCeq-0001mP-GD for pgsql-interfaces@arkaria.postgresql.org; Mon, 06 Mar 2023 15:21:48 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pZCeq-0001mG-8t for pgsql-interfaces@lists.postgresql.org; Mon, 06 Mar 2023 15:21:48 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pZCek-0001SS-6r for pgsql-interfaces@lists.postgresql.org; Mon, 06 Mar 2023 15:21:47 +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 326FLUgp3352437; Mon, 6 Mar 2023 10:21:30 -0500 From: Tom Lane To: Flaris Feller cc: pgsql-interfaces@lists.postgresql.org Subject: Re: Transaction control in a C language function In-reply-to: References: Comments: In-reply-to Flaris Feller message dated "Mon, 06 Mar 2023 07:36:32 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3352435.1678116090.1@sss.pgh.pa.us> Date: Mon, 06 Mar 2023 10:21:30 -0500 Message-ID: <3352436.1678116090@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Flaris Feller writes: > I would like to implement transaction control in a function implemented in > C language. That will certainly not work unless you make it a procedure. It'd be a good idea also to check that the CALL came from a non-atomic context. regards, tom lane