Remove assertion from PortalRunMulti

We have an assertion to ensure that a command tag has been assigned by
the time we're done executing, but if we happen to execute a command
with no queries, the assertion would fail.  Per discussion, rather than
contort things to get a tag assigned, just remove the assertion.

Oversight in 2f9661311b83.  That commit also retained a comment that
explained logic that had been adjacent to it but diffused into various
places, leaving none apt to keep part of the comment.  Remove that part,
and rewrite what remains for extra clarity.

Bug: #18984
Backpatch-through: 13
Reported-by: Aleksander Alekseev <aleksan...@tigerdata.com>
Reviewed-by: Tom Lane <t...@sss.pgh.pa.us>
Reviewed-by: Michaël Paquier <mich...@paquier.xyz>
Discussion: https://postgr.es/m/18984-0f4778a6599ac...@postgresql.org

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/4871c1e9cb6e1a085f68c3c399dc4ba95d108524

Modified Files
--------------
src/backend/tcop/pquery.c | 25 ++++++++-----------------
1 file changed, 8 insertions(+), 17 deletions(-)

Reply via email to