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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: exclusion(at)gmail(dot)com
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18984: Empty prepared statement from psql \parse triggers assert in PortalRunMulti
Date: 2025-07-14 19:23:12
Message-ID: 713717.1752520992@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2025-07-14 19:36:01 Re: BUG #18984: Empty prepared statement from psql \parse triggers assert in PortalRunMulti
Previous Message PG Bug reporting form 2025-07-14 19:00:02 BUG #18984: Empty prepared statement from psql \parse triggers assert in PortalRunMulti