Re: [PATCH] Add additional extended protocol commands to psql: \parse and \bindx
Jelte Fennema-Nio <postgres@jeltef.nl>
From: Jelte Fennema-Nio <postgres@jeltef.nl>
To: Anthonin Bonnefoy <anthonin.bonnefoy@datadoghq.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2024-01-16T12:51:59Z
Lists: pgsql-hackers
One more usability thing. I think \parse and \close should not require a \g to send the message. You can do that by returning PSQL_CMD_SEND instead of PSQL_CMD_SKIP_LIN. I feel like the main point of requiring \g for \bind and \bindx is so you can also use \gset or \gexec. But since \parse and \close don't return any rows that argument does not apply to them. And regarding the docs. I think the examples for \bindx and \close should use \parse instead of PREPARE. ISTM that people will likely want to use the extended query protocol for preparing and executing, not a mix of them. I know that it's possible to do that, but I think the examples should cover the most common use case.
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