Re: Proposal to provide the facility to set binary format output for specific OID's per session

Joe Conway <mail@joeconway.com>

From: Joe Conway <mail@joeconway.com>
To: Jack Christensen <jack@jackchristensen.com>, Dave Cramer <davecramer@gmail.com>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-07-25T17:30:43Z
Lists: pgsql-hackers
On 7/25/22 10:07, Jack Christensen wrote:
> The advantage is to be able to use the binary format with only a single 
> network round trip in cases where prepared statements are not possible. 
> e.g. when using PgBouncer. Using the simple protocol with this patch 
> lets users of pgx (the Go driver mentioned above) and PgBouncer use the 
> binary format. The performance gains can be significant especially with 
> types such as timestamptz that are very slow to parse.
> 
> As far as only sending binary types that the client can understand, the 
> client driver would call `set format_binary` at the beginning of the 
> session.

+1 makes a lot of sense to me.

Dave please add this to the open commitfest (202209)

-- 
Joe Conway
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com