psql: Add command to use extended query protocol
| От | Peter Eisentraut |
|---|---|
| Тема | psql: Add command to use extended query protocol |
| Дата | |
| Msg-id | e8dd1cd5-0e04-3598-0518-a605159fe314@enterprisedb.com обсуждение исходный текст |
| Ответы |
Re: psql: Add command to use extended query protocol
Re: psql: Add command to use extended query protocol Re: psql: Add command to use extended query protocol Re: psql: Add command to use extended query protocol Re: psql: Add command to use extended query protocol |
| Список | pgsql-hackers |
This adds a new psql command \gp that works like \g (or semicolon) but
uses the extended query protocol. Parameters can also be passed, like
SELECT $1, $2 \gp 'foo' 'bar'
I have two main purposes for this:
One, for transparent column encryption [0], we need a way to pass
protocol-level parameters. The present patch in the [0] thread uses a
command \gencr, but based on feedback and further thinking, a
general-purpose command seems better.
Two, for testing the extended query protocol from psql. For example,
for the dynamic result sets patch [1], I have several ad-hoc libpq test
programs lying around, which would be cumbersome to integrate into the
patch. With psql support like proposed here, it would be very easy to
integrate a few equivalent tests.
Perhaps this would also be useful for general psql scripting.
[0]: https://commitfest.postgresql.org/40/3718/
[1]: https://commitfest.postgresql.org/40/2911/
Вложения
В списке pgsql-hackers по дате отправления: