diff options
| author | Clifford Gama <cliffygamy@gmail.com> | 2025-01-16 14:05:50 +0200 |
|---|---|---|
| committer | Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> | 2025-03-18 16:49:53 +0100 |
| commit | 611e7bc3a0633a35ae3430e359c646e02fa3801d (patch) | |
| tree | e21082b838c3566ebcfb7b0ac6298d48d8090f0d /docs | |
| parent | 0dcc4a1dbc56b1f3aef9be749aff96a85ca92721 (diff) | |
Fixed #36078 -- Doc'd that Postgres normalizes a range field with no points to empty.
Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/contrib/postgres/fields.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/ref/contrib/postgres/fields.txt b/docs/ref/contrib/postgres/fields.txt index ec767b50e9..65bff7f9e6 100644 --- a/docs/ref/contrib/postgres/fields.txt +++ b/docs/ref/contrib/postgres/fields.txt @@ -517,6 +517,15 @@ excluded, that is ``[)`` (see the PostgreSQL documentation for details about fields (:class:`.DateTimeRangeField` and :class:`.DecimalRangeField`) by using the ``default_bounds`` argument. +.. admonition:: PostgreSQL normalizes a range with no points to the empty range + + A range with equal values specified for an included lower bound and an + excluded upper bound, such as ``Range(datetime.date(2005, 6, 21), + datetime.date(2005, 6, 21))`` or ``[4, 4)``, has no points. PostgreSQL will + normalize the value to empty when saving to the database, and the original + bound values will be lost. See the `PostgreSQL documentation for details + <https://www.postgresql.org/docs/current/rangetypes.html#RANGETYPES-IO>`_. + ``IntegerRangeField`` --------------------- |
