Re: [PATCH] Add additional extended protocol commands to psql: \parse and \bindx
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Jelte Fennema-Nio <postgres@jeltef.nl>
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-19T07:09:21Z
Lists: pgsql-hackers
On Wed, Jun 18, 2025 at 09:15:07AM +0200, Jelte Fennema-Nio wrote: > On Wed, 18 Jun 2025 at 08:23, Anthonin Bonnefoy <anthonin.bonnefoy@datadoghq.com> wrote: >> Since \bind_named is also new, we can also rename it to make it >> consistent with close meta-command. So what about renaming \bind_named >> to \bindprepared and \close to \closeprepared? > > 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. > For that command it > should differentiate from the already existing \bind command, which is > also for prepared statements, just not for "named" prepared > statements. While close needs to differentiate from close for portals > vs close for prepared statements. Good point. I would be on board with a \close_prepared then, if that's the consensus we reach, without touching at \bind_named. We still have time to decide on the name until the release, just let's make sure to not do a rename multiple times. -- Michael
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