summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorMads Jensen <mje@inducks.org>2016-06-01 23:43:59 +0200
committerTim Graham <timograham@gmail.com>2016-09-21 12:11:37 -0400
commit094d630ae8d8e5e68817c313da0fd737898b216b (patch)
treeb9ddc286156eaf775f82b51c124816f9e366f77f /docs/ref
parent7eda99f03f6dfbd5a4a3f1e40e6d51842fd3268f (diff)
Fixed #26610 -- Added CITextField to contrib.postgres.
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/contrib/postgres/fields.txt20
-rw-r--r--docs/ref/contrib/postgres/operations.txt9
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``
===================