Re: BUG #18984: Empty prepared statement from psql \parse triggers assert in PortalRunMulti

Álvaro Herrera <alvherre@kurilemu.de>

From: Álvaro Herrera <alvherre@kurilemu.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Michael Paquier <michael@paquier.xyz>, exclusion@gmail.com, pgsql-bugs@lists.postgresql.org
Date: 2025-07-15T12:33:14Z
Lists: pgsql-bugs

Attachments

On 2025-Jul-15, Tom Lane wrote:

> Michael Paquier <michael@paquier.xyz> writes:
> > ... I am wondering if we should not just nuke the assertion at the end
> > of PortalRunMulti() instead, relying on the same check done at the
> > beginning of ProcessUtility().
> 
> 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.

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Minor cosmetic tweaks

  2. Simplify coding in ProcessQuery

  3. Remove assertion from PortalRunMulti

  4. Represent command completion tags as structs