diff options
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/contrib/postgres/fields.txt | 20 | ||||
| -rw-r--r-- | docs/ref/contrib/postgres/operations.txt | 9 |
2 files changed, 29 insertions, 0 deletions
diff --git a/docs/ref/contrib/postgres/fields.txt b/docs/ref/contrib/postgres/fields.txt index 3d22b13577..93f14fcca0 100644 --- a/docs/ref/contrib/postgres/fields.txt +++ b/docs/ref/contrib/postgres/fields.txt @@ -250,6 +250,26 @@ At present using :attr:`~django.db.models.Field.db_index` will create a A more useful index is a ``GIN`` index, which you should create using a :class:`~django.db.migrations.operations.RunSQL` operation. +``CITextField`` +=============== + +.. class:: CITextField(**options) + + .. versionadded:: 1.11 + + This field is a subclass of :class:`~django.db.models.CharField` backed by + the citext_ type, a case-insensitive character string type. Read about `the + performance considerations`_ prior to using this field. + + To use this field, setup the ``citext`` extension in PostgreSQL before the + first ``CreateModel`` migration operation using the + :class:`~django.contrib.postgres.operations.CITextExtension` operation. The + code to setup the extension is similar to the example for + :class:`~django.contrib.postgres.fields.HStoreField`. + + .. _citext: https://www.postgresql.org/docs/current/static/citext.html + .. _the performance considerations: https://www.postgresql.org/docs/current/static/citext.html#AEN169274 + ``HStoreField`` =============== diff --git a/docs/ref/contrib/postgres/operations.txt b/docs/ref/contrib/postgres/operations.txt index 656be8e976..4dcc85105f 100644 --- a/docs/ref/contrib/postgres/operations.txt +++ b/docs/ref/contrib/postgres/operations.txt @@ -27,6 +27,15 @@ the ``django.contrib.postgres.operations`` module. Install the ``btree_gin`` extension. +``CITextExtension`` +=================== + +.. class:: CITextExtension() + + .. versionadded:: 1.11 + + Installs the ``citext`` extension. + ``HStoreExtension`` =================== |
