mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Fixed #14094 -- Added support for unlimited CharField on PostgreSQL.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
This commit is contained in:
parent
78f163a4fb
commit
7eee1dca42
12 changed files with 78 additions and 15 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue