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

From Jeff Davis
Subject Re: Request for comment on setting binary format output per session
Date
Msg-id da80008bfdacc2f3d007a963e9c7118688118b96.camel@j-davis.com
Whole thread Raw
In response to Re: Request for comment on setting binary format output per session  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Request for comment on setting binary format output per session  (Dave Cramer <davecramer@gmail.com>)
List pgsql-hackers
On Wed, 2023-03-22 at 14:42 -0400, Tom Lane wrote:
> This isn't going to help much unless we change the wire protocol
> so that RowDescription messages carry these UUIDs instead of
> (or in addition to?) the OIDs of the column datatypes.  While
> that's not completely out of the question, it's a heavy lift
> that will affect multiple layers of client code along with the
> server.

I'm not sure that's a hard requirement. I pointed out a similar
solution for type names here:

https://www.postgresql.org/message-id/4297b9e310172b9a1e6d737e21ad8796d0ab7b03.camel@j-davis.com

In other words: if the Bind message depends on knowing the OID
mappings, that forces an extra round-trip; but if the client doesn't
need the mapping until it receives its first result, then it can use
pipelining to avoid the extra round-trip.

(I haven't actually tried it and I don't know if it's very reasonable
to expect the client to do this.)

> Also, what about container types?  I doubt it's sane for
> array-of-foo to have a UUID that's unrelated to the one for foo.
> Composites and ranges would need some intelligence too if we
> don't want them to be unduly complicated to process.

That's a good point. I don't know if that is a major design issue or
not; but it certainly adds complexity to the proposal and/or clients
implementing it.

Regards,
    Jeff Davis




pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: meson documentation build open issues
Next
From: Tom Lane
Date:
Subject: Re: HOT chain validation in verify_heapam()