Question: Select messages using binary format

Started by Aleksei Ivanovalmost 6 years ago2 messages
#1Aleksei Ivanov
iv.alekseii@gmail.com

Dear hackers,

I know that it is possible to receive packets in binary format using
declare binary cursor and than fetching the result.

But is it possible just using ordinary select from simple query to specify
that I want to receive the result in binary?

Best regards,

#2Pavel Stehule
pavel.stehule@gmail.com
In reply to: Aleksei Ivanov (#1)
Re: Question: Select messages using binary format

Hi

so 7. 3. 2020 v 8:38 odesílatel Aleksei Ivanov <iv.alekseii@gmail.com>
napsal:

Dear hackers,

I know that it is possible to receive packets in binary format using
declare binary cursor and than fetching the result.

But is it possible just using ordinary select from simple query to specify
that I want to receive the result in binary?

It depends on interface that you use. C API - libpq allow to specify type
of communication per query

https://www.postgresql.org/docs/current/libpq-exec.html

PQexecParams *resultFormat*

What I known, you cannot to do from SQL level.

Regards

Pavel

Show quoted text

Best regards,