diff options
| author | Mads Jensen <mje@inducks.org> | 2017-11-14 22:51:51 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-11-29 10:40:01 -0500 |
| commit | 4d3b8e199ec00a0aba111637a25f5abcaf3d6dfc (patch) | |
| tree | a07340cb704486ebbbfecadaae2038599cfc566b /django/db/backends/postgresql/operations.py | |
| parent | ae4132a940486c86364bae71b92b7e95d62cc4a7 (diff) | |
[2.0.x] Fixed #28702 -- Made query lookups for CIText fields use citext.
Backport of f0a68c25118786d47041d0a435b2afa953be3c86 from master
Diffstat (limited to 'django/db/backends/postgresql/operations.py')
| -rw-r--r-- | django/db/backends/postgresql/operations.py | 2 |
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" |
