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 1nWRR9-0006WM-4c for pgsql-bugs@arkaria.postgresql.org; Mon, 21 Mar 2022 23:27:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nWRR7-0002xK-Vt for pgsql-bugs@arkaria.postgresql.org; Mon, 21 Mar 2022 23:27:41 +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 1nWRR7-0002ve-O9 for pgsql-bugs@lists.postgresql.org; Mon, 21 Mar 2022 23:27:41 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nWRR1-00088k-BX for pgsql-bugs@lists.postgresql.org; Mon, 21 Mar 2022 23:27:40 +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 22LNRXxv2411145; Mon, 21 Mar 2022 19:27:33 -0400 From: Tom Lane To: Peter Geoghegan cc: yaser.amiri95@gmail.com, PostgreSQL mailing lists Subject: Re: BUG #17445: "ON CONFLICT" has different behaviors when its param is passed with prepared stmt or hard coded In-reply-to: References: <17445-fb74db6348391e85@postgresql.org> <2405214.1647901437@sss.pgh.pa.us> <2409082.1647903795@sss.pgh.pa.us> Comments: In-reply-to Peter Geoghegan message dated "Mon, 21 Mar 2022 16:14:21 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2411143.1647905253.1@sss.pgh.pa.us> Date: Mon, 21 Mar 2022 19:27:33 -0400 Message-ID: <2411144.1647905253@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Peter Geoghegan writes: > On Mon, Mar 21, 2022 at 4:03 PM Tom Lane wrote: >> Perhaps a specific error message would be worth the trouble. > I'm not sure how difficult it would be offhand, so I can't commit to it now. Searching that expression tree for an EXTERN Param surely wouldn't take much code. What's not clear to me though is whether that's the full extent of problematic cases. (Picking a user-friendly wording for the error message might be hard too.) regards, tom lane