Tom, I was unable to reproduce the issue with standard libpq. Moreover, I found why it was returned as Text. It was actually a bug in passing resultFormats in the Bind message. Sorry for the false alert, my fault.
Thank you for the help!On Fri, Mar 4, 2016 at 10:52 PM, Tom Lane <tgl@xxxxxxxxxxxxx> wrote:
Konstantin Izmailov <pgfizm@xxxxxxxxx> writes:
> Whole point of my question was why PG does not return
> binary formatted field when requested (this is a feature supported in the
> protocol).
You haven't presented a test case demonstrating that that happens in
unmodified community source code. If it does happen, I'd be happy to look
into it, because I agree it'd be a bug. But I have other things to spend
my time on than reverse-engineering test cases out of code fragments
dependent on incompletely-described custom modifications of Postgres.
regards, tom lane