Removed unnecessary casting when using builtin lookups on PostgreSQL.
This commit is contained in:
parent
7a2c27112d
commit
658f1e81a7
|
@ -83,6 +83,8 @@ class DatabaseOperations(BaseDatabaseOperations):
|
||||||
'istartswith', 'endswith', 'iendswith', 'regex', 'iregex'):
|
'istartswith', 'endswith', 'iendswith', 'regex', 'iregex'):
|
||||||
if internal_type in ('IPAddressField', 'GenericIPAddressField'):
|
if internal_type in ('IPAddressField', 'GenericIPAddressField'):
|
||||||
lookup = "HOST(%s)"
|
lookup = "HOST(%s)"
|
||||||
|
elif internal_type in ('CharField', 'TextField'):
|
||||||
|
lookup = '%s'
|
||||||
else:
|
else:
|
||||||
lookup = "%s::text"
|
lookup = "%s::text"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue