Re: [PATCH] Add additional extended protocol commands to psql: \parse and \bindx
Anthonin Bonnefoy <anthonin.bonnefoy@datadoghq.com>
From: Anthonin Bonnefoy <anthonin.bonnefoy@datadoghq.com>
To: Jelte Fennema-Nio <postgres@jeltef.nl>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2024-01-16T08:13:17Z
Lists: pgsql-hackers
Attachments
- v2-0001-psql-Add-support-for-prepared-stmt-with-extended-.patch (application/octet-stream) patch v2-0001
Hi,
Thanks for the review and comments.
> One thing that I think should be added for completeness though is the
> ability to deallocate the prepared statement using
> PQsendClosePrepared. Other than that the changes look great.
Good point, I've added the \close command.
> Also a tiny nitpick: stmt_name should be replaced with STMT_NAME in
> this line of the help message.
Fixed
On Sat, Jan 13, 2024 at 3:37 PM Jelte Fennema-Nio <postgres@jeltef.nl> wrote:
>
> On Thu, 2 Nov 2023 at 10:52, Anthonin Bonnefoy
> <anthonin.bonnefoy@datadoghq.com> wrote:
> > The main goal is to provide more ways to test extended protocol in
> > regression tests
> > similarly to what \bind is doing.
>
> I think this is a great addition. One thing that I think should be
> added for completeness though is the ability to deallocate the
> prepared statement using PQsendClosePrepared. Other than that the
> changes look great.
>
> Also a tiny nitpick: stmt_name should be replaced with STMT_NAME in
> this line of the help message.
>
> > + HELP0(" \\bindx stmt_name [PARAM]...\n"
Commits
-
psql: Rename meta-command \close to \close_prepared
- fc39b286ad72 18.0 landed
-
psql: Add tests for repeated calls of \bind[_named]
- 91287b5f5da3 18.0 landed
-
psql: Fix memory leak with repeated calls of \bind
- c2fb2f9e200f 16.5 landed
- b0ae6db2088b 17.0 landed
-
psql: Clean up more aggressively state of \bind[_named], \parse and \close
- 87eeadaea143 18.0 landed
-
psql: Add more meta-commands able to use the extended protocol
- d55322b0da60 18.0 landed
-
psql: Add ignore_slash_options in bind's inactive branch
- 04c0897d3bca 17.0 landed