summaryrefslogtreecommitdiff
path: root/django/db/backends/postgresql/operations.py
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2017-04-06 20:28:21 -0400
committerSimon Charette <charette.s@gmail.com>2017-04-07 16:47:52 -0400
commita354c69055fd818e612ce22eaa2da0576a4b89ee (patch)
treeba38fef11f821c00fdac9cb1b7b848ffd2553512 /django/db/backends/postgresql/operations.py
parent67b2b1f116aceee12922d2a8ff832382bca7e8ad (diff)
downloaddjango-a354c69055fd818e612ce22eaa2da0576a4b89ee.tar.gz
Fixed #28038 -- Restored casting to text of builtin lookups on PostgreSQL.
Reverted 658f1e8 which broke code using __icontains's implicit cast to ::text on ArrayField. Thanks Peter J. Farrell for the report.
Diffstat (limited to 'django/db/backends/postgresql/operations.py')
-rw-r--r--django/db/backends/postgresql/operations.py2
1 files changed, 0 insertions, 2 deletions
diff --git a/django/db/backends/postgresql/operations.py b/django/db/backends/postgresql/operations.py
index 4658eac7c1..497a5303a2 100644
--- a/django/db/backends/postgresql/operations.py
+++ b/django/db/backends/postgresql/operations.py
@@ -74,8 +74,6 @@ class DatabaseOperations(BaseDatabaseOperations):
'istartswith', 'endswith', 'iendswith', 'regex', 'iregex'):
if internal_type in ('IPAddressField', 'GenericIPAddressField'):
lookup = "HOST(%s)"
- elif internal_type in ('CharField', 'TextField'):
- lookup = '%s'
else:
lookup = "%s::text"