From: Tom Lane <tgl@sss.pgh.pa.us>
To: Álvaro Herrera <alvherre@kurilemu.de>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: exclusion@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18984: Empty prepared statement from psql \parse triggers assert in PortalRunMulti
Date: Tue, 15 Jul 2025 10:57:54 -0400
Message-ID: <905237.1752591474@sss.pgh.pa.us> (raw)
In-Reply-To: <202507151233.n5jw4x3jtc2g@alvherre.pgsql>
References: <202507151233.n5jw4x3jtc2g@alvherre.pgsql>
=?utf-8?Q?=C3=81lvaro?= Herrera <alvherre@kurilemu.de> writes:
> On 2025-Jul-15, Tom Lane wrote:
>> Yeah, I was starting to think about that solution too. Removing
>> code seems nicer than adding more.
> Yeah, this makes sense to me too. I'd rewrite the comment while at it,
> because what's being described as "printing 0 0" no longer occurs in
> this form in this place anymore. Maybe we could discuss adding
> some commentary to EndCommand where this now happens, but I don't think
> we really need it.
Right, I was giving that comment the side eye too. I agree that its
second para is no longer useful: the logic it describes certainly
isn't here anymore, and there doesn't seem to be an identifiable place
where we could move it to. (I think the concern it describes is now
baked into the table design for command tags, specifically that any
given CMDTAG either has or doesn't have a count.) I might write the
replacement comment more like
* If query completion data is requested and not yet filled in,
* and the portal has a default command tag, copy it from there.
* See QueryRewrite(), step 3, for motivation.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, alvherre@kurilemu.de, michael@paquier.xyz, 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: <905237.1752591474@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox