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 1ubOli-000Kff-7Q for pgsql-bugs@arkaria.postgresql.org; Mon, 14 Jul 2025 19:23:18 +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 1ubOlg-00CQN2-7G for pgsql-bugs@arkaria.postgresql.org; Mon, 14 Jul 2025 19:23:16 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ubOlf-00CQLz-VP for pgsql-bugs@lists.postgresql.org; Mon, 14 Jul 2025 19:23:16 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1ubOle-007hY2-1P for pgsql-bugs@lists.postgresql.org; Mon, 14 Jul 2025 19:23:16 +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 56EJNCUR713718; Mon, 14 Jul 2025 15:23:12 -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: <713716.1752520992.1@sss.pgh.pa.us> Date: Mon, 14 Jul 2025 15:23:12 -0400 Message-ID: <713717.1752520992@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: > The following psql script: > \parse s > execute s; > invokes: > TRAP: failed Assert("qc->commandTag != CMDTAG_UNKNOWN"), File: "pquery.c", > Line: 1369, PID: 1123863 What this is complaining about, essentially, is that we don't know how to construct a command tag to send back to the client. Maybe we could invent some new command tag out of whole cloth, but I'm inclined to think it'd be better to forbid empty prepared statements. Not sure where that should be enforced, but probably on the server side. regards, tom lane