diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/contrib/postgres/indexes.txt | 19 | ||||
| -rw-r--r-- | docs/releases/2.2.txt | 3 |
2 files changed, 22 insertions, 0 deletions
diff --git a/docs/ref/contrib/postgres/indexes.txt b/docs/ref/contrib/postgres/indexes.txt index e7c681e6ba..2d966553c3 100644 --- a/docs/ref/contrib/postgres/indexes.txt +++ b/docs/ref/contrib/postgres/indexes.txt @@ -72,3 +72,22 @@ available from the ``django.contrib.postgres.indexes`` module. .. _buffering build: https://www.postgresql.org/docs/current/static/gist-implementation.html#GIST-BUFFERING-BUILD .. _fillfactor: https://www.postgresql.org/docs/current/static/sql-createindex.html#SQL-CREATEINDEX-STORAGE-PARAMETERS + +``HashIndex`` +============= + +.. class:: HashIndex(fillfactor=None, **options) + + .. versionadded:: 2.2 + + Creates a hash index. + + Provide an integer value from 10 to 100 to the fillfactor_ parameter to + tune how packed the index pages will be. PostgreSQL's default is 90. + + .. admonition:: Use this index only on PostgreSQL 10 and later + + Hash indexes have been available in PostgreSQL for a long time, but + they suffer from a number of data integrity issues in older versions. + + .. _fillfactor: https://www.postgresql.org/docs/current/static/sql-createindex.html#SQL-CREATEINDEX-STORAGE-PARAMETERS diff --git a/docs/releases/2.2.txt b/docs/releases/2.2.txt index a581d8d317..cf3e9bff80 100644 --- a/docs/releases/2.2.txt +++ b/docs/releases/2.2.txt @@ -82,6 +82,9 @@ Minor features :class:`~django.contrib.postgres.aggregates.StringAgg` determines the ordering of the aggregated elements. +* The new :class:`~django.contrib.postgres.indexes.HashIndex` class + allows creating ``hash`` indexes in the database. + :mod:`django.contrib.redirects` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
