Note this new discussion which would make result format more flexible

https://www.postgresql.org/message-id/flat/40cbb35d-774f-23ed-3079-03f938aac...@2ndquadrant.com

On Fri, Dec 14, 2018 at 04:52:15PM +0100, Christoph Zwerschke wrote:
> Am 14.12.2018 um 15:11 schrieb Justin Pryzby:
> > I doubt it's easily possible, but what would it take to receive data
> > in binary format ?
> 
> Yes, it's not so easy: "Values passed in binary format require knowledge of
> the internal representation expected by the backend. For example, integers
> must be passed in network byte order. Passing numeric values requires
> knowledge of the server storage format, as implemented in
> src/backend/utils/adt/numeric.c::numeric_send() and
> src/backend/utils/adt/numeric.c::numeric_recv()." I fear the internal
> representation might also change between Postgres versions.
> 
> > Note that libpq doesn't allow the possibility to handling binary only
> > for "easy" columns types like ints, it's all or nothing.
> 
> Right. But note that this is only true for the result format, not for the
> parameter formats - they can be different (specify in paramFormats).
_______________________________________________
PyGreSQL mailing list
PyGreSQL@Vex.Net
https://mail.vex.net/mailman/listinfo/pygresql

Reply via email to