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

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: exclusion@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Date: 2025-07-14T19:23:12Z
Lists: pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> 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



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