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: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, exclusion(at)gmail(dot)com, 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-17 15:00:56
Message-ID: 1409149.1752764456@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I wrote:
> =?utf-8?Q?=C3=81lvaro?= Herrera <alvherre(at)kurilemu(dot)de> writes:

> I think that where the Portal gets a tag is in PortalDefineQuery,
> and that's normally set as a result of parsing.

So rather than using the word "default", maybe like

* If a command tag was requested and we did not fill in a
* run-time-determined tag above, copy the parse-time tag
* from the Portal. (There might not be any tag there either,
* in edge cases such as empty prepared statements. That's OK.)

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Geoghegan 2025-07-17 15:05:01 Re: Postgres: Queries are too slow after upgrading to PG17 from PG15
Previous Message Tom Lane 2025-07-17 13:58:44 Re: BUG #18989: Output of \sf does not match original source for E quoted strings (unlike \df+ used to)