Skip to content
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

Hasql backend for Opaleye #529

Open
mgajda opened this issue Sep 19, 2021 · 4 comments
Open

Hasql backend for Opaleye #529

mgajda opened this issue Sep 19, 2021 · 4 comments

Comments

@mgajda
Copy link

mgajda commented Sep 19, 2021

hasql shows better benchmark results than PGSQL library.

It would be more secure and faster, if opaleye could support it.

@tomjaguarpaw I open the ticket in case there is a future work on this.

@ocharles
Copy link
Collaborator

Rel8 uses hasql as a backend, not postgresql-simple, so this may give us a bit reuse if it were to happen

@tomjaguarpaw
Copy link
Owner

I only chose postgresql-simple because it seemed to be the default thing to use. Is there any strong reason for Opaleye not to migrate to Hasql in a future version?

@ocharles
Copy link
Collaborator

A big unknown to me is the stability of the binary protocol in comparison to the text protocol

@AnthonySuper
Copy link
Contributor

One huge benefit of this is that postgresql-simple uses query string interpolation, which is both slower and more error-prone than queries with bind parameters. It would probably require an annoyingly hefty rewrite to take advantage of this in Opaleye, unfortunately, but I think it would wind up being worth it for increased security.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants