pgx icon indicating copy to clipboard operation
pgx copied to clipboard

Use BINARY mode for results

Open craff opened this issue 3 years ago • 1 comments

Hello,

I read in the documentation of postgresql that results of query can be sent to the client in BINARY, I guess it should improve efficiency and could even be simpler (the coding and decoding with string are often catchy).

So it would be nice if pgx whas using BINARY when possible instead of STRING ?

craff avatar Jul 17 '22 18:07 craff

The complicated thing with binary mode is that it's mostly undocumented ("do whatever libpq does"), so the code will probably be simpler once it's implemented, but it's much harder to implement. There's some discussion of it on https://github.com/arenadotio/pgx/issues/38#issuecomment-439923472

brendanlong avatar Jan 03 '23 21:01 brendanlong