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

Anthonin Bonnefoy <anthonin.bonnefoy@datadoghq.com>

From: Anthonin Bonnefoy <anthonin.bonnefoy@datadoghq.com>
To: Jelte Fennema-Nio <postgres@jeltef.nl>
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-21T07:29:04Z
Lists: pgsql-hackers

Attachments

On Wed, Aug 21, 2024 at 12:00 AM Jelte Fennema-Nio <postgres@jeltef.nl> wrote:
> @Anthonin are you planning to update the patch accordingly?

Here's the patch with \bindx renamed to \bind_named.

I've also made a small change to Michael's refactoring in 0002 by
initialising success to false in ExecQueryAndProcessResults. There was
a compiler warning about success possibly used uninitialized[1].

[1] https://cirrus-ci.com/task/6207675187331072

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