summaryrefslogtreecommitdiff
path: root/django/db/backends/postgresql/operations.py
diff options
context:
space:
mode:
authorMads Jensen <mje@inducks.org>2017-11-14 22:51:51 +0100
committerTim Graham <timograham@gmail.com>2017-11-29 10:35:37 -0500
commitf0a68c25118786d47041d0a435b2afa953be3c86 (patch)
tree81677eaf779c786596e8669b1515b7278a2a8bf6 /django/db/backends/postgresql/operations.py
parent78c5e7b90eee10067d39a8ba6588e6b53ba00d82 (diff)
downloaddjango-f0a68c25118786d47041d0a435b2afa953be3c86.tar.gz
Fixed #28702 -- Made query lookups for CIText fields use citext.
Diffstat (limited to 'django/db/backends/postgresql/operations.py')
-rw-r--r--django/db/backends/postgresql/operations.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/django/db/backends/postgresql/operations.py b/django/db/backends/postgresql/operations.py
index 268fa99b51..c4a61f7070 100644
--- a/django/db/backends/postgresql/operations.py
+++ b/django/db/backends/postgresql/operations.py
@@ -77,6 +77,8 @@ class DatabaseOperations(BaseDatabaseOperations):
'istartswith', 'endswith', 'iendswith', 'regex', 'iregex'):
if internal_type in ('IPAddressField', 'GenericIPAddressField'):
lookup = "HOST(%s)"
+ elif internal_type in ('CICharField', 'CIEmailField', 'CITextField'):
+ lookup = '%s::citext'
else:
lookup = "%s::text"