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

From Merlin Moncure
Subject Re: Request for comment on setting binary format output per session
Date
Msg-id CAHyXU0xB5KC=2uFeX54taWdb5bwYAxrBcCU2VpYLMP52P_PhcQ@mail.gmail.com
Whole thread Raw
In response to Re: Request for comment on setting binary format output per session  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: Request for comment on setting binary format output per session  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-hackers
On Wed, Mar 29, 2023 at 11:04 AM Jeff Davis <pgsql@j-davis.com> wrote:
 I'm not clear on what proposal you are making and/or endorsing?

ha -- was just backing up dave's GUC idea.
 
1. Fix our own clients, like psql, to check for binary data they can't
process.

This ought to be impossible IMO.  All libpq routines except PQexec have an explicit expectation on format (via resultformat parameter) that should not be overridden.  PQexec ought to be explicitly documented and wired to only request text format data.

resultfomat can be extended now or later to allow 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).  Similarly, in JDBC world, it ought to be up to the driver to determine when it want the server to flex wire formats but must be able to override the server's decision.

merlin

pgsql-hackers by date:

Previous
From: vignesh C
Date:
Subject: Re: Support logical replication of DDLs
Next
From: Nikita Malakhov
Date:
Subject: Re: JsonPath version bits