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

From: Dave Cramer <davecramer(at)gmail(dot)com>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(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-03-23 19:37:05
Message-ID: CADK3HHKS+y7kLKzzkez9pPHHpvfxN-nXEto=fYSxNemoA2X9SQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 22 Mar 2023 at 15:23, Jeff Davis <pgsql(at)j-davis(dot)com> wrote:

> 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.
>

This overcomplicates things for the JDBC driver. We don't pipeline queries,
well we do for batch queries but those are special.

> (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.
>

So where do we go from here ?

I can implement using type names as well as OID's

Dave

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2023-03-23 19:37:15 Re: HOT chain validation in verify_heapam()
Previous Message Brar Piening 2023-03-23 19:08:52 Re: doc: add missing "id" attributes to extension packaging page