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

Jelte Fennema-Nio <postgres@jeltef.nl>

From: Jelte Fennema-Nio <postgres@jeltef.nl>
To: Anthonin Bonnefoy <anthonin.bonnefoy@datadoghq.com>
Cc: Michael Paquier <michael@paquier.xyz>, Peter Eisentraut <peter@eisentraut.org>, Tomas Vondra <tomas.vondra@enterprisedb.com>, vignesh C <vignesh21@gmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2024-08-20T22:00:06Z
Lists: pgsql-hackers
On Thu, 25 Jul 2024 at 08:45, Anthonin Bonnefoy
<anthonin.bonnefoy@datadoghq.com> wrote:
> +1 keeping this as a separate command and using \bind_named. \bind has
> a different behaviour as it also parses the query so keeping them as
> separate commands would probably avoid some confusion.

+1 on naming it \bind_named

@Anthonin are you planning to update the patch accordingly?



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