diff options
| author | Tim Graham <timograham@gmail.com> | 2016-03-12 12:17:21 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-03-12 12:58:16 -0500 |
| commit | d3c2d82ddef4b2bcf9d3d0b1ac59d7d65f5a7406 (patch) | |
| tree | cdcf584d963aec046f550aa5c9ba8e9bddaa6c28 | |
| parent | 421ad283d3a0c9814e6cf5b87b393dce09f59474 (diff) | |
[1.9.x] Fixed #26345 -- Clarified which RangesFields always return a canonical form.
Backport of b3610f38facb33704c1fd77590c6a2fa07c40fa7 from master
| -rw-r--r-- | docs/ref/contrib/postgres/fields.txt | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/docs/ref/contrib/postgres/fields.txt b/docs/ref/contrib/postgres/fields.txt index 20b68b588a..a70cebea08 100644 --- a/docs/ref/contrib/postgres/fields.txt +++ b/docs/ref/contrib/postgres/fields.txt @@ -586,7 +586,7 @@ suitable for. All of the range fields translate to :ref:`psycopg2 Range objects <psycopg2:adapt-range>` in python, but also accept tuples as input if no bounds information is necessary. The default is lower bound included, upper bound -excluded. +excluded; that is, ``[)``. ``IntegerRangeField`` --------------------- @@ -598,6 +598,10 @@ excluded. the database and a :class:`~psycopg2:psycopg2.extras.NumericRange` in Python. + Regardless of the bounds specified when saving the data, PostgreSQL always + returns a range in a canonical form that includes the lower bound and + excludes the upper bound; that is ``[)``. + ``BigIntegerRangeField`` ------------------------ @@ -608,6 +612,10 @@ excluded. in the database and a :class:`~psycopg2:psycopg2.extras.NumericRange` in Python. + Regardless of the bounds specified when saving the data, PostgreSQL always + returns a range in a canonical form that includes the lower bound and + excludes the upper bound; that is ``[)``. + ``FloatRangeField`` ------------------- @@ -636,6 +644,10 @@ excluded. :class:`~django.db.models.DateField`. Represented by a ``daterange`` in the database and a :class:`~psycopg2:psycopg2.extras.DateRange` in Python. + Regardless of the bounds specified when saving the data, PostgreSQL always + returns a range in a canonical form that includes the lower bound and + excludes the upper bound; that is ``[)``. + Querying Range Fields --------------------- |
