From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: psql: Add command to use extended query protocol |
Date: | 2022-11-15 13:28:47 |
Message-ID: | E1ouvza-000JUB-I6@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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 <corey(dot)huinker(at)gmail(dot)com>
Discussion: https://www.postgresql.org/message-id/flat/e8dd1cd5-0e04-3598-0518-a605159fe314(at)enterprisedb(dot)com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/5b66de3433e2110b38a2b32aaaa0b9cdac8aacdb
Modified Files
--------------
doc/src/sgml/ref/psql-ref.sgml | 36 ++++++++++++++++++++++++++++++++++++
src/bin/psql/command.c | 37 +++++++++++++++++++++++++++++++++++++
src/bin/psql/common.c | 15 ++++++++++++++-
src/bin/psql/help.c | 1 +
src/bin/psql/settings.h | 3 +++
src/bin/psql/tab-complete.c | 1 +
src/test/regress/expected/psql.out | 31 +++++++++++++++++++++++++++++++
src/test/regress/sql/psql.sql | 14 ++++++++++++++
8 files changed, 137 insertions(+), 1 deletion(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Gustafsson | 2022-11-15 13:59:29 | pgsql: doc: Use more concise wording for pl/pgSQL TG_ variables |
Previous Message | Peter Eisentraut | 2022-11-15 11:32:20 | pgsql: libpq error message refactoring, part 2 |