summaryrefslogtreecommitdiff
path: root/docs/ref/contrib/postgres
diff options
context:
space:
mode:
Diffstat (limited to 'docs/ref/contrib/postgres')
-rw-r--r--docs/ref/contrib/postgres/fields.txt10
1 files changed, 9 insertions, 1 deletions
diff --git a/docs/ref/contrib/postgres/fields.txt b/docs/ref/contrib/postgres/fields.txt
index 29dbc0db85..31ef0d3982 100644
--- a/docs/ref/contrib/postgres/fields.txt
+++ b/docs/ref/contrib/postgres/fields.txt
@@ -170,7 +170,7 @@ Returns objects where the data shares any results with the values passed. Uses
the SQL operator ``&&``. For example::
>>> Post.objects.create(name='First post', tags=['thoughts', 'django'])
- >>> Post.objects.create(name='Second post', tags=['thoughts'])
+ >>> Post.objects.create(name='Second post', tags=['thoughts', 'tutorial'])
>>> Post.objects.create(name='Third post', tags=['tutorial', 'django'])
>>> Post.objects.filter(tags__overlap=['thoughts'])
@@ -179,6 +179,14 @@ the SQL operator ``&&``. For example::
>>> Post.objects.filter(tags__overlap=['thoughts', 'tutorial'])
<QuerySet [<Post: First post>, <Post: Second post>, <Post: Third post>]>
+ >>> Post.objects.filter(tags__overlap=Post.objects.values_list('tags'))
+ <QuerySet [<Post: First post>, <Post: Second post>, <Post: Third post>]>
+
+.. versionchanged:: 4.2
+
+ Support for ``QuerySet.values()`` and ``values_list()`` as a right-hand
+ side was added.
+
.. fieldlookup:: arrayfield.len
``len``