summaryrefslogtreecommitdiff
path: root/django/db/backends/postgresql/operations.py
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2017-07-27 19:36:47 +0200
committerGitHub <noreply@github.com>2017-07-27 19:36:47 +0200
commitb61d5b1991e2ca2c3450ccc334224f3d51da39dc (patch)
tree8cb9dee554eb78d43d69950dcf756d8eedac5d0d /django/db/backends/postgresql/operations.py
parent14172cf4426de6c867028f1c194011c0a26e662d (diff)
downloaddjango-b61d5b1991e2ca2c3450ccc334224f3d51da39dc.tar.gz
Fixed #28371 -- Fixed Cast() with CharField if the max_length argument isn't provided.
Thanks Tim Graham for the review.
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 497a5303a2..2cc886a76d 100644
--- a/django/db/backends/postgresql/operations.py
+++ b/django/db/backends/postgresql/operations.py
@@ -5,6 +5,8 @@ from django.db.backends.base.operations import BaseDatabaseOperations
class DatabaseOperations(BaseDatabaseOperations):
+ cast_char_field_without_max_length = 'varchar'
+
def unification_cast_sql(self, output_field):
internal_type = output_field.get_internal_type()
if internal_type in ("GenericIPAddressField", "IPAddressField", "TimeField", "UUIDField"):