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 1oM8Nt-0007CL-Kv for pgsql-bugs@arkaria.postgresql.org; Thu, 11 Aug 2022 13:38:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oM8Ns-0000wk-CI for pgsql-bugs@arkaria.postgresql.org; Thu, 11 Aug 2022 13:38:00 +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 1oM8Ns-0000wZ-37 for pgsql-bugs@lists.postgresql.org; Thu, 11 Aug 2022 13:38:00 +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 1oM8Np-0004TW-2u for pgsql-bugs@lists.postgresql.org; Thu, 11 Aug 2022 13:37:58 +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 27BDb8EZ481804; Thu, 11 Aug 2022 09:37:08 -0400 From: Tom Lane To: Alvaro Herrera cc: Richard Guo , borz_off@cs.msu.su, PostgreSQL mailing lists Subject: Re: BUG #17579: 15beta2: strange error when trying to use MERGE statement as a CTE In-reply-to: <20220811114020.li7sp32bxqsnlx7n@alvherre.pgsql> References: <20220811114020.li7sp32bxqsnlx7n@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Thu, 11 Aug 2022 13:40:20 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <481802.1660225028.1@sss.pgh.pa.us> Date: Thu, 11 Aug 2022 09:37:08 -0400 Message-ID: <481803.1660225028@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Alvaro Herrera writes: > On 2022-Aug-11, Richard Guo wrote: >> +1 to disallow it for now. > This patch does that. The parse error location seems quite oddly chosen. Can you make it point at the MERGE instead? I think exprLocation(cte->ctequery) might work, but not sure. regards, tom lane