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

JSON question mark operators don't work #247

Open
Vlix opened this issue Mar 1, 2018 · 1 comment
Open

JSON question mark operators don't work #247

Vlix opened this issue Mar 1, 2018 · 1 comment

Comments

@Vlix
Copy link

Vlix commented Mar 1, 2018

When trying to use the new (since PostgreSQL 9.4) operators on jsonb that contain question marks, the package incorrectly assumes they are parameters to be replaced with values by Database.PostgreSQL.Simple.buildQuery.

I propose a change to buildQuery that escapes ?? to ? without trying to count it as a to be replaced parameter. This is a very common method of escaping question marks in prepared statements afaik.
I also don't expect anything breaking after this change, but if anyone knows of an instance this change may break something, do tell.

I can make a pull request if desired.

@Vlix
Copy link
Author

Vlix commented Jun 28, 2018

I've made the pull request and updated it to include tests for the new jsonb operators

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

1 participant