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 1lNfJy-0003IE-Re for pgsql-general@arkaria.postgresql.org; Sat, 20 Mar 2021 17:23:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lNfJx-0000VJ-6Z for pgsql-general@arkaria.postgresql.org; Sat, 20 Mar 2021 17:23:29 +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 1lNfJw-0000VC-Uu for pgsql-general@lists.postgresql.org; Sat, 20 Mar 2021 17:23:28 +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 1lNfJu-0001A6-P4 for pgsql-general@lists.postgresql.org; Sat, 20 Mar 2021 17:23:28 +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 12KHNLji228722; Sat, 20 Mar 2021 13:23:21 -0400 From: Tom Lane To: Adrian Klaver cc: Niko Ware , pgsql-general@lists.postgresql.org Subject: Re: Programmatic Trigger Create In-reply-to: <5566ea3a-e0ae-8595-a13f-ec525e7c9eeb@aklaver.com> References: <5566ea3a-e0ae-8595-a13f-ec525e7c9eeb@aklaver.com> Comments: In-reply-to Adrian Klaver message dated "Sat, 20 Mar 2021 10:13:50 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <228720.1616261001.1@sss.pgh.pa.us> Date: Sat, 20 Mar 2021 13:23:21 -0400 Message-ID: <228721.1616261001@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Adrian Klaver writes: > In what program is: > EXEC SQL EXECUTE IMMEDIATE :my_sql_cmd > being done? Presumably ECPG, which if memory serves defaults to not-auto-commit. Maybe Niko is failing to commit the transaction? If all else fails, turning on log_statements on the server and examining the log might help debug what the program is doing wrong. regards, tom lane