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 1ucQ6g-00CjlE-P9 for pgsql-bugs@arkaria.postgresql.org; Thu, 17 Jul 2025 15:01:10 +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 1ucQ6d-003UzV-2x for pgsql-bugs@arkaria.postgresql.org; Thu, 17 Jul 2025 15:01:07 +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 1ucQ6c-003UzN-Qj for pgsql-bugs@lists.postgresql.org; Thu, 17 Jul 2025 15:01:07 +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 1ucQ6Y-008H3w-0e for pgsql-bugs@lists.postgresql.org; Thu, 17 Jul 2025 15:01:07 +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 56HF0u861409150; Thu, 17 Jul 2025 11:00:56 -0400 From: Tom Lane To: =?utf-8?Q?=C3=81lvaro?= Herrera cc: Michael Paquier , exclusion@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18984: Empty prepared statement from psql \parse triggers assert in PortalRunMulti In-reply-to: <1400898.1752759934@sss.pgh.pa.us> References: <202507171203.y6yp2n25fk6f@alvherre.pgsql> <1400898.1752759934@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Thu, 17 Jul 2025 09:45:34 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1409148.1752764456.1@sss.pgh.pa.us> Date: Thu, 17 Jul 2025 11:00:56 -0400 Message-ID: <1409149.1752764456@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I wrote: > =?utf-8?Q?=C3=81lvaro?= Herrera writes: > I think that where the Portal gets a tag is in PortalDefineQuery, > and that's normally set as a result of parsing. So rather than using the word "default", maybe like * If a command tag was requested and we did not fill in a * run-time-determined tag above, copy the parse-time tag * from the Portal. (There might not be any tag there either, * in edge cases such as empty prepared statements. That's OK.) regards, tom lane