Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1syGkf-00FYE0-1r for pgsql-bugs@arkaria.postgresql.org; Tue, 08 Oct 2024 20:24:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1syGkd-00BTQQ-Hz for pgsql-bugs@arkaria.postgresql.org; Tue, 08 Oct 2024 20:24:11 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1syGkd-00BTQI-9a for pgsql-bugs@lists.postgresql.org; Tue, 08 Oct 2024 20:24:11 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1syGka-003CK4-Td for pgsql-bugs@lists.postgresql.org; Tue, 08 Oct 2024 20:24:10 +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 498KO7pu2246128; Tue, 8 Oct 2024 16:24:07 -0400 From: Tom Lane To: "David G. Johnston" cc: brandystodd@gmail.com, PostgreSQL Bug List Subject: Re: BUG #18647: INSERT statements execute functions twice. In-reply-to: References: <18647-8ac606f2f23b1621@postgresql.org> Comments: In-reply-to "David G. Johnston" message dated "Tue, 08 Oct 2024 13:04:17 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2246126.1728419047.1@sss.pgh.pa.us> Date: Tue, 08 Oct 2024 16:24:07 -0400 Message-ID: <2246127.1728419047@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "David G. Johnston" writes: > The create table for party probably helps too. I'm wondering about ON INSERT rules for that table ... > IOW, make it possible for someone to reproduce your issue. Indeed. I tried some simple experiments with setting a breakpoint on the standard nextval() function, and I don't see more than one call. regards, tom lane