Re: Request for comment on setting binary format output per session - Mailing list pgsql-hackers

From Jelte Fennema
Subject Re: Request for comment on setting binary format output per session
Date
Msg-id CAGECzQR_S=gQ8SQHNaMzEiASp6cpFnxxaTDpTY6pGB=7P+3Vtg@mail.gmail.com
Whole thread Raw
In response to Re: Request for comment on setting binary format output per session  (Dave Cramer <davecramer@gmail.com>)
Responses Re: Request for comment on setting binary format output per session
List pgsql-hackers
On Mon, 9 Oct 2023 at 21:08, Dave Cramer <davecramer@gmail.com> wrote:
> So if we use <schema>.<type> would it be possible to have something like <builtin> which represents a set of well
knowntypes?
 
> My goal here is to reduce the overhead of naming all the types the client  wants in binary. The list of well known
typesis pretty long.
 
> Additionally we could have a shorthand for removing a well known type.

You're only setting this once in the lifetime of the connection right,
i.e. right at the start (although pgbouncer could set it once per
transaction in the worst case). It seems like it shouldn't really
matter much to optimize the size of the "SET format_binary=..."
command, I'd expect it to be at most 1 kilobyte. I'm not super opposed
to having a shorthand for some of the most commonly wanted built-in
types, but then we'd need to decide on what those are, which would add
even more discussion/bikeshedding to this thread. I'm not sure the win
in size is worth that effort.



pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: CHECK Constraint Deferrable
Next
From: Andres Freund
Date:
Subject: Re: Remove distprep