Re: [PATCH] Add additional extended protocol commands to psql: \parse and \bindx

Jelte Fennema-Nio <postgres@jeltef.nl>

From: Jelte Fennema-Nio <postgres@jeltef.nl>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: Michael Paquier <michael@paquier.xyz>, Greg Sabino Mullane <htamfids@gmail.com>, vignesh C <vignesh21@gmail.com>, Anthonin Bonnefoy <anthonin.bonnefoy@datadoghq.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2025-06-17T14:05:45Z
Lists: pgsql-hackers
On Fri, 13 Jun 2025 at 15:57, Peter Eisentraut <peter@eisentraut.org> wrote:
> That doesn't address the concern that it's confusing what kind of object
> \close operates on.  There are named and unnamed cursors (= portals),
> after all.

Agreed. My vote is for \closeprepared as that aligns with the libpq function.



Commits

  1. psql: Rename meta-command \close to \close_prepared

  2. psql: Add tests for repeated calls of \bind[_named]

  3. psql: Fix memory leak with repeated calls of \bind

  4. psql: Clean up more aggressively state of \bind[_named], \parse and \close

  5. psql: Add more meta-commands able to use the extended protocol

  6. psql: Add ignore_slash_options in bind's inactive branch