On Mon, Aug 22, 2022 at 05:52:29PM +0700, John Naylor wrote:
> If the data is binary and not printable ASCII, then there is no easy
> workaround.
I would say the chief solution is to request binary transmission in your
application. This cuts your network traffic in half for retrieving a bytea,
so it's a good change even if the server improves someday. If you're using
libpq, search for show_binary_results in
https://www.postgresql.org/docs/devel/libpq-example.html to see an example of
doing this. I don't know of an equivalent option in ODBC; if there is none,
one could modify the ODBC driver to use the same protocol feature that libpq
uses.