summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAdrian Torres <atorresj@redhat.com>2022-11-10 19:31:31 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-12-28 12:31:04 +0100
commit7eee1dca420ee7c4451d24cd32fa08aed0dcbb36 (patch)
treef643059561e9699cc961845f63faf0a3664ff5d0 /docs
parent78f163a4fb3937aca2e71786fbdd51a0ef39629e (diff)
Fixed #14094 -- Added support for unlimited CharField on PostgreSQL.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/models/fields.txt10
-rw-r--r--docs/releases/4.2.txt4
2 files changed, 12 insertions, 2 deletions
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt
index d460e81ef4..4fb39fde82 100644
--- a/docs/ref/models/fields.txt
+++ b/docs/ref/models/fields.txt
@@ -617,9 +617,11 @@ The default form widget for this field is a :class:`~django.forms.TextInput`.
.. attribute:: CharField.max_length
- Required. The maximum length (in characters) of the field. The max_length
+ The maximum length (in characters) of the field. The ``max_length``
is enforced at the database level and in Django's validation using
- :class:`~django.core.validators.MaxLengthValidator`.
+ :class:`~django.core.validators.MaxLengthValidator`. It's required for all
+ database backends included with Django except PostgreSQL, which supports
+ unlimited ``VARCHAR`` columns.
.. note::
@@ -628,6 +630,10 @@ The default form widget for this field is a :class:`~django.forms.TextInput`.
``max_length`` for some backends. Refer to the :doc:`database backend
notes </ref/databases>` for details.
+ .. versionchanged:: 4.2
+
+ Support for unlimited ``VARCHAR`` columns was added on PostgreSQL.
+
.. attribute:: CharField.db_collation
Optional. The database collation name of the field.
diff --git a/docs/releases/4.2.txt b/docs/releases/4.2.txt
index 90fdf9bd1b..755ebcb717 100644
--- a/docs/releases/4.2.txt
+++ b/docs/releases/4.2.txt
@@ -318,6 +318,10 @@ Models
:meth:`~.RelatedManager.aclear`, :meth:`~.RelatedManager.aremove`, and
:meth:`~.RelatedManager.aset`.
+* :attr:`CharField.max_length <django.db.models.CharField.max_length>` is no
+ longer required to be set on PostgreSQL, which supports unlimited ``VARCHAR``
+ columns.
+
Requests and Responses
~~~~~~~~~~~~~~~~~~~~~~