Created
March 5, 2015 10:19
-
-
Save cloud8421/8fe7b8dc8d4eed09bb18 to your computer and use it in GitHub Desktop.
yesql problematic query
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT jdoc->'guid', jdoc->'name' FROM api WHERE jdoc -> 'tags' ? 'qui'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
More info here: http://www.postgresql.org/docs/9.4/interactive/datatype-json.html
In short: the
?
is a valid operator that check for the existence of thetags
key withqui
value in ajdoc
jsonb column. When used with yesql, it gets parsed as a positional argument. Is there anything I can do to avoid that?