summaryrefslogtreecommitdiff
path: root/docs/ref/contrib/postgres/fields.txt
diff options
context:
space:
mode:
Diffstat (limited to 'docs/ref/contrib/postgres/fields.txt')
-rw-r--r--docs/ref/contrib/postgres/fields.txt23
1 files changed, 23 insertions, 0 deletions
diff --git a/docs/ref/contrib/postgres/fields.txt b/docs/ref/contrib/postgres/fields.txt
index 387eb0f02e..14cb1d00cb 100644
--- a/docs/ref/contrib/postgres/fields.txt
+++ b/docs/ref/contrib/postgres/fields.txt
@@ -944,3 +944,26 @@ corresponding lookups.
NOT_LT = '&>'
NOT_GT = '&<'
ADJACENT_TO = '-|-'
+
+RangeBoundary() expressions
+---------------------------
+
+.. versionadded:: 3.0
+
+.. class:: RangeBoundary(inclusive_lower=True, inclusive_upper=False)
+
+ .. attribute:: inclusive_lower
+
+ If ``True`` (default), the lower bound is inclusive ``'['``, otherwise
+ it's exclusive ``'('``.
+
+ .. attribute:: inclusive_upper
+
+ If ``False`` (default), the upper bound is exclusive ``')'``, otherwise
+ it's inclusive ``']'``.
+
+A ``RangeBoundary()`` expression represents the range boundaries. It can be
+used with a custom range functions that expected boundaries, for example to
+define :class:`~django.contrib.postgres.constraints.ExclusionConstraint`. See
+`the PostgreSQL documentation for the full details <https://www.postgresql.org/
+docs/current/rangetypes.html#RANGETYPES-INCLUSIVITY>`_.