diff options
author | Simon Charette <charette.s@gmail.com> | 2016-09-21 21:53:48 -0400 |
---|---|---|
committer | Simon Charette <charette.s@gmail.com> | 2016-09-22 22:19:37 -0400 |
commit | 658f1e81a7ea29acf30bbf8f61ffec2beff24639 (patch) | |
tree | 5da1422d22164b17cc205bc06b3017a652bc34db /django/db/backends/postgresql/operations.py | |
parent | 7a2c27112d1f804f75191e9bf45a96a89318a684 (diff) | |
download | django-658f1e81a7ea29acf30bbf8f61ffec2beff24639.tar.gz |
Removed unnecessary casting when using builtin lookups on PostgreSQL.
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 c32ca040e7..a30d24a0eb 100644 --- a/django/db/backends/postgresql/operations.py +++ b/django/db/backends/postgresql/operations.py @@ -83,6 +83,8 @@ 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" |