psql: Add command to use extended query protocol - Mailing list pgsql-hackers

From Peter Eisentraut
Subject psql: Add command to use extended query protocol
Date
Msg-id e8dd1cd5-0e04-3598-0518-a605159fe314@enterprisedb.com
Whole thread Raw
Responses Re: psql: Add command to use extended query protocol  (Michael Paquier <michael@paquier.xyz>)
Re: psql: Add command to use extended query protocol  (Justin Pryzby <pryzby@telsasoft.com>)
Re: psql: Add command to use extended query protocol  (Simon Riggs <simon.riggs@enterprisedb.com>)
Re: psql: Add command to use extended query protocol  (Corey Huinker <corey.huinker@gmail.com>)
Re: psql: Add command to use extended query protocol  (Jehan-Guillaume de Rorthais <jgdr@dalibo.com>)
List 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/
Attachment

pgsql-hackers by date:

Previous
From: Peter Smith
Date:
Subject: Re: Support logical replication of DDLs
Next
From: Erik Rijkers
Date:
Subject: Re: Code checks for App Devs, using new options for transaction behavior