Re: Request for comment on setting binary format output per session

From: Jelte Fennema <postgres(at)jeltef(dot)nl>
To: Dave Cramer <davecramer(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, Merlin Moncure <mmoncure(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jeff Davis <pgsql(at)j-davis(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Request for comment on setting binary format output per session
Date: 2023-10-09 21:11:25
Message-ID: CAGECzQR_S=gQ8SQHNaMzEiASp6cpFnxxaTDpTY6pGB=7P+3Vtg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 9 Oct 2023 at 21:08, Dave Cramer <davecramer(at)gmail(dot)com> wrote:
> So if we use <schema>.<type> would it be possible to have something like <builtin> which represents a set of well known types?
> My goal here is to reduce the overhead of naming all the types the client wants in binary. The list of well known types is 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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2023-10-09 21:14:11 Re: Remove distprep
Previous Message David G. Johnston 2023-10-09 21:07:35 Re: CHECK Constraint Deferrable