BUG #18984: Empty prepared statement from psql \parse triggers assert in PortalRunMulti
PG Bug reporting form <noreply@postgresql.org>
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: exclusion@gmail.com
Date: 2025-07-14T19:00:02Z
Lists: pgsql-bugs
The following bug has been logged on the website:
Bug reference: 18984
Logged by: Alexander Lakhin
Email address: exclusion@gmail.com
PostgreSQL version: 18beta1
Operating system: Ubuntu 24.04
Description:
The following psql script:
\parse s
execute s;
invokes:
TRAP: failed Assert("qc->commandTag != CMDTAG_UNKNOWN"), File: "pquery.c",
Line: 1369, PID: 1123863
ExceptionalCondition at assert.c:52:13
PortalRunMulti at pquery.c:1371:1
PortalRun at pquery.c:792:5
ExecuteQuery at prepare.c:260:2
standard_ProcessUtility at utility.c:757:4
ProcessUtility at utility.c:523:3
PortalRunUtility at pquery.c:1153:2
PortalRunMulti at pquery.c:1310:5
PortalRun at pquery.c:792:5
exec_simple_query at postgres.c:1280:11
...
Reproduced starting from d55322b0d.
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Minor cosmetic tweaks
- e76221bd95f0 19 (unreleased) landed
-
Simplify coding in ProcessQuery
- a27c40bfe8ab 19 (unreleased) landed
-
Remove assertion from PortalRunMulti
- e0d3f3cfb6f2 18.0 landed
- c2720ac6010a 15.14 landed
- b9a89682846f 14.19 landed
- b8926a5b4bb8 19 (unreleased) landed
- 4871c1e9cb6e 16.10 landed
- 43cd85962755 13.22 landed
- 0c466f5e0b34 17.6 landed
-
Represent command completion tags as structs
- 2f9661311b83 13.0 cited