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

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Álvaro Herrera <alvherre@kurilemu.de>
Cc: Michael Paquier <michael@paquier.xyz>, exclusion@gmail.com, pgsql-bugs@lists.postgresql.org
Date: 2025-07-17T15:00:56Z
Lists: pgsql-bugs
I wrote:
> =?utf-8?Q?=C3=81lvaro?= Herrera <alvherre@kurilemu.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



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Minor cosmetic tweaks

  2. Simplify coding in ProcessQuery

  3. Remove assertion from PortalRunMulti

  4. Represent command completion tags as structs