File: indexes.txt

package info (click to toggle)
python-django 1%3A1.11.29-1~deb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 47,428 kB
  • sloc: python: 220,776; javascript: 13,523; makefile: 209; xml: 201; sh: 64
file content (36 lines) | stat: -rw-r--r-- 1,127 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
=================================
PostgreSQL specific model indexes
=================================

.. module:: django.contrib.postgres.indexes

.. versionadded:: 1.11

The following are PostgreSQL specific :doc:`indexes </ref/models/indexes>`
available from the ``django.contrib.postgres.indexes`` module.

``BrinIndex``
=============

.. class:: BrinIndex(fields=[], name=None, pages_per_range=None)

    Creates a `BRIN index
    <https://www.postgresql.org/docs/current/static/brin-intro.html>`_.

    The ``pages_per_range`` argument takes a positive integer.

``GinIndex``
============

.. class:: GinIndex()

    Creates a `gin index
    <https://www.postgresql.org/docs/current/static/gin.html>`_.

    To use this index on data types not in the `built-in operator classes
    <https://www.postgresql.org/docs/current/static/gin-builtin-opclasses.html>`_,
    you need to activate the `btree_gin extension
    <https://www.postgresql.org/docs/current/static/btree-gin.html>`_ on
    PostgreSQL. You can install it using the
    :class:`~django.contrib.postgres.operations.BtreeGinExtension` migration
    operation.