From 5b66de3433e2110b38a2b32aaaa0b9cdac8aacdb Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 15 Nov 2022 13:50:27 +0100 Subject: psql: Add command to use extended query protocol This adds a new psql command \bind that sets query parameters and causes the next query to be sent using the extended query protocol. Example: SELECT $1, $2 \bind 'foo' 'bar' \g This may be useful for psql scripting, but one of the main purposes is also to be able to test various aspects of the extended query protocol from psql and to write tests more easily. Reviewed-by: Corey Huinker Discussion: https://www.postgresql.org/message-id/flat/e8dd1cd5-0e04-3598-0518-a605159fe314@enterprisedb.com --- src/bin/psql/help.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/bin/psql/help.c') diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index f8ce1a07060..b4e0ec2687f 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -189,6 +189,7 @@ slashUsage(unsigned short int pager) initPQExpBuffer(&buf); HELP0("General\n"); + HELP0(" \\bind [PARAM]... set query parameters\n"); HELP0(" \\copyright show PostgreSQL usage and distribution terms\n"); HELP0(" \\crosstabview [COLUMNS] execute query and display result in crosstab\n"); HELP0(" \\errverbose show most recent error message at maximum verbosity\n"); -- cgit v1.2.3