From: | Dave Cramer <davecramer(at)gmail(dot)com> |
---|---|
To: | Jeff Davis <pgsql(at)j-davis(dot)com> |
Cc: | Merlin Moncure <mmoncure(at)gmail(dot)com>, 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-31 00:54:12 |
Message-ID: | CADK3HHJicM2bRfUY+08Ym9s=U5QCvM53Mp+DWd24NOeA0iwyTQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Dave Cramer
On Thu, 30 Mar 2023 at 15:40, Jeff Davis <pgsql(at)j-davis(dot)com> wrote:
> On Thu, 2023-03-30 at 07:06 -0500, Merlin Moncure wrote:
> > 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.
>
> Right now it's clearly documented[1] which formats will be returned for
> a given Bind message. That can be seen as the root of the problem with
> psql -- we are breaking the protocol by returning binary when psql can
> rightfully expect text.
>
> It is a minor break, because something needed to send the "SET
> binary_formats='...'" command, but the protocol docs would need to be
> updated for sure.
>
> > 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.
>
I'm confused. How does using resultFormat=3 change anything ?
Dave
From | Date | Subject | |
---|---|---|---|
Next Message | houzj.fnst@fujitsu.com | 2023-03-31 01:49:28 | RE: Non-superuser subscription owners |
Previous Message | Bruce Momjian | 2023-03-30 23:41:21 | Re: Partial aggregates pushdown |