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

vignesh C <vignesh21@gmail.com>

From: vignesh C <vignesh21@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Anthonin Bonnefoy <anthonin.bonnefoy@datadoghq.com>, Jelte Fennema-Nio <postgres@jeltef.nl>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2024-01-27T03:26:53Z
Lists: pgsql-hackers

Attachments

On Fri, 19 Jan 2024 at 10:50, Michael Paquier <michael@paquier.xyz> wrote:
>
> On Thu, Jan 18, 2024 at 09:25:16AM +0100, Anthonin Bonnefoy wrote:
> > From what I can tell, there's no change in the behaviour. All paths
> > would eventually go through HandleSlashCmds's cleaning logic. This is
> > also mentioned in ignore_slash_options's comment.
>
> Yeah, I can confirm that.  I would be really tempted to backpatch that
> because that's a bug: we have to call ignore_slash_options() for
> inactive branches when a command parses options with OT_NORMAL.  Now,
> I cannot break things, either.
>
> > Done. patch 1 adds ignore_slash_options to bind. patch 2 adds the new
> > \bindx, \close and \parse commands.
>
> 0001 has been applied on HEAD.

Since the 0001 patch has been applied, sending only 0002 as v5-0001 so
that CFBot can apply and run.

Regards,
Vignesh

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