-
Notifications
You must be signed in to change notification settings - Fork 142
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
Why contains does not uses @> operator #96
Comments
hi @rodo, sorry for the delayed answer. We are open for improvements. @niwibe @fabiocorneti any thoughts on this? |
Looking at the code in query.py (verified), this behavior seems to kick in when you are querying on more than one key |
Another place to look at is: https://github.com/djangonauts/django-hstore/blob/master/django_hstore/lookups.py Unfortunately there is some code duplication because for django >= 1.7 the new lookups are used. |
BTW @rodo we are open for improvements |
This is a fairly significant issue, as GIN/GiST indexes are only used with
Ideally there would be syntax which would make the operator ( |
Practical proposals still welcome. |
Hi,
I probably miss something, I'm a end user of django-hstore and just discover that when doing
Cerise.objects.filter(data__contains={'org': 'foo'})
the query executed use the = operator instead of @> that I presume
When I would see
WHERE data @> 'soc=>"breme"'::hstore;
If I do not miss anything, will you be open for a path to use @> operator, that is really more efficient with right indexes (not in this obvious case)
The text was updated successfully, but these errors were encountered: