New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support binary format #506
Comments
Interesting. I am not familiar with this. Is it just the results of the queries you want to be in binary format, or also the query itself. From the API you linked it looks like only the query parameters can be in binary format, not the query itself. Is that right? |
If you can give me an example of how to use the |
My understanding is that it is possible to get results in binary format, see for example https://www.postgresql.org/docs/9.6/libpq-example.html#LIBPQ-EXAMPLE-3 . However, I have not investigated how to execute a similar query in Haskell yet. I'll update this issue if I get to it, although the performance problems I mentioned are currently not so critical, and so it probably won't happen very soon. |
OK, it's good to have this issue here as a reminder that it would be a useful thing to implement. I don't currently have the time to drive this forward myself, but if you discover how to fit all the pieces together I can help you plug it into Opaleye. (Having said that, it's possible that this should go into |
Would it be possible to re-use parts from hasql for this? It uses the binary interface. |
Theoretically we could just add a hasql backend. That's what rel8 does. |
libpq
supports a binary interchange format -- see https://www.stackage.org/haddock/lts-17.11/postgresql-libpq-0.9.4.3/Database-PostgreSQL-LibPQ.html#v:execParams .We recently ran into some performance issues, and I suspect that avoiding to escape the results of queries would greatly help. However I think
opaleye
and evenpostgresql-simple
do not support the binary format -- so I didn't go very far.The text was updated successfully, but these errors were encountered: