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 1ubOy6-000MqF-IC for pgsql-bugs@arkaria.postgresql.org; Mon, 14 Jul 2025 19:36:06 +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 1ubOy4-00CZfp-BI for pgsql-bugs@arkaria.postgresql.org; Mon, 14 Jul 2025 19:36:04 +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 1ubOy4-00CZfh-2u for pgsql-bugs@lists.postgresql.org; Mon, 14 Jul 2025 19:36:04 +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.96) (envelope-from ) id 1ubOy3-007HoR-09 for pgsql-bugs@lists.postgresql.org; Mon, 14 Jul 2025 19:36:03 +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 56EJa1Dp715435; Mon, 14 Jul 2025 15:36:01 -0400 From: Tom Lane To: exclusion@gmail.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18984: Empty prepared statement from psql \parse triggers assert in PortalRunMulti In-reply-to: <18984-0f4778a6599ac3ae@postgresql.org> References: <18984-0f4778a6599ac3ae@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Mon, 14 Jul 2025 19:00:02 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <715433.1752521761.1@sss.pgh.pa.us> Date: Mon, 14 Jul 2025 15:36:01 -0400 Message-ID: <715434.1752521761@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > Reproduced starting from d55322b0d. BTW, d55322b0d simply made it easy to trigger the bug from psql. If I use current psql to connect to older servers, I can demonstrate crashes (or sometimes "stack depth limit exceeded") back to v12. Pre-v12 is immune because it just returns a command tag of EXECUTE regardless of what is in the prepared statement. That being the case, maybe we should band-aid this by returning EXECUTE if the prepared statement is empty. regards, tom lane