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

Dave Cramer <davecramer@gmail.com>

From: Dave Cramer <davecramer@gmail.com>
To: Jeff Davis <pgsql@j-davis.com>
Cc: Merlin Moncure <mmoncure@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Peter Eisentraut <peter.eisentraut@enterprisedb.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-04-03T16:28:50Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Silence compiler warning introduced in 1edb3b491b

> participating clients to receive GUC configured format.  I do not

> > think that libpq's result format being able to be overridden by GUC
>> > is a good idea at all, the library has to to participate, and I
>> > think can be made to so so without adjusting the interface (say, by
>> > resultFormat = 3).
>>
>> Interesting idea. I suppose you'd need to specify 3 for all result
>> columns? That is a protocol change, but wouldn't "break" older clients.
>> The newer clients would need to make sure that they're connecting to
>> v16+, so using the protocol version alone wouldn't be enough. Hmm.
>>
>
>
So this only works with extended protocol and not simple queries.
Again, as Peter mentioned it's already easy enough to confuse psql using
binary cursors so
it makes sense to fix psql either way.

If you use resultFormat (3) I think you'd still end up doing the Describe
(which we are trying to avoid) to make sure you could receive all the
columns in binary.

Dave