Re: Wire protocol: type-specific opt-in to binary format - Mailing list pgsql-hackers

From Florian Pflug
Subject Re: Wire protocol: type-specific opt-in to binary format
Date
Msg-id 28FEC0D9-8B0E-4B27-9A49-91DF18BA61A6@phlo.org
Whole thread Raw
In response to Wire protocol: type-specific opt-in to binary format  (Florian Weimer <fweimer@bfk.de>)
Responses Re: Wire protocol: type-specific opt-in to binary format
List pgsql-hackers
On Nov24, 2011, at 10:03 , Florian Weimer wrote:
> I would like to add functionality which allows a client to tell the
> server which types can be sent in binary format.  The immediate goal is
> to suppress hex quoting for BYTEA values, but it seems to make sense to
> make this functionality more general.

If you use the extended query protocol, the client can already choose
text vs. binary representation on a per-column basis. You can query the
result's column types by issuing a Describe message after the Parse message.
For each column you can then decide whether you want textual or binary
representation, and include that choice in the subsequent Bind message.

best regards,
Florian Pflug



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: bug of recovery?
Next
From: Alvaro Herrera
Date:
Subject: Re: Notes on implementing URI syntax for libpq