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: Michael Paquier <michael@paquier.xyz>
Cc: Anthonin Bonnefoy <anthonin.bonnefoy@datadoghq.com>, Peter Eisentraut <peter@eisentraut.org>, Greg Sabino Mullane <htamfids@gmail.com>, vignesh C <vignesh21@gmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2025-06-23T07:21:46Z
Lists: pgsql-hackers
On Thu, 19 Jun 2025 at 09:09, Michael Paquier <michael@paquier.xyz> wrote:
> > I think I still prefer \bind_named or maybe \bindnamed (depending on
> > what our policy for underscores in \ commands is).
>
> Not sure that there is such a policy in place.  I find names with
> underscores easier to parse.

I just double checked and there are already psql meta-commands with
underscores. So it seems fine to have underscores in our new commands
too.



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