From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Aleksander Alekseev <aleksander(at)tigerdata(dot)com> |
Cc: | pgsql-bugs(at)lists(dot)postgresql(dot)org, exclusion(at)gmail(dot)com |
Subject: | Re: BUG #18984: Empty prepared statement from psql \parse triggers assert in PortalRunMulti |
Date: | 2025-07-14 21:40:22 |
Message-ID: | 743115.1752529222@sss.pgh.pa.us |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Aleksander Alekseev <aleksander(at)tigerdata(dot)com> writes:
>> That being the case, maybe we should band-aid this by returning
>> EXECUTE if the prepared statement is empty.
> This sounds pretty straightforward and seems to solve the problem.
> Patch attached.
Hmm, throwing an error is exactly not what I was suggesting above.
The attached quick draft (needs attention to comments) results in
regression=# \parse s
regression=# execute s;
EXECUTE
which matches the behavior of pre-v12 servers.
(BTW, I wonder why psql is emitting an extra newline after \parse.)
regards, tom lane
Attachment | Content-Type | Size |
---|---|---|
wip-avoid-failure-with-empty-prepared-query.patch | text/x-diff | 482 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2025-07-14 22:05:50 | Re: BUG #18984: Empty prepared statement from psql \parse triggers assert in PortalRunMulti |
Previous Message | Aleksander Alekseev | 2025-07-14 21:33:11 | Re: BUG #18984: Empty prepared statement from psql \parse triggers assert in PortalRunMulti |