diff options
| author | Marc Tamlyn <marc.tamlyn@gmail.com> | 2014-12-21 14:36:37 +0000 |
|---|---|---|
| committer | Marc Tamlyn <marc.tamlyn@gmail.com> | 2014-12-23 10:38:32 +0000 |
| commit | 5ca82e710e2f92b8c5114492205c8764918407d3 (patch) | |
| tree | 47fe9f6501c2b93c164ff866b2945a0b4d3f8153 /docs | |
| parent | 803947161b2296a1c71b9cb7822c469a5fffef04 (diff) | |
Fixed #24033 -- Use interval type on Oracle.
Use INTERVAL DAY(9) TO SECOND(6) for Durationfield on Oracle rather than
storing as a NUMBER(19) of microseconds.
There are issues with cx_Oracle which require some extra data
manipulation in the database backend when constructing queries, but it
handles the conversion back to timedelta objects cleanly.
Thanks to Shai for the review.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/models/fields.txt | 3 | ||||
| -rw-r--r-- | docs/releases/1.8.txt | 7 |
2 files changed, 6 insertions, 4 deletions
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt index 203241ae5f..5eabf84cad 100644 --- a/docs/ref/models/fields.txt +++ b/docs/ref/models/fields.txt @@ -551,7 +551,8 @@ The default form widget for this field is a :class:`~django.forms.TextInput`. A field for storing periods of time - modeled in Python by :class:`~python:datetime.timedelta`. When used on PostgreSQL, the data type -used is an ``interval``, otherwise a ``bigint`` of microseconds is used. +used is an ``interval`` and on Oracle the data type is ``INTERVAL DAY(9) TO +SECOND(6)``. Otherwise a ``bigint`` of microseconds is used. .. note:: diff --git a/docs/releases/1.8.txt b/docs/releases/1.8.txt index 25d71e1235..77609ed7b5 100644 --- a/docs/releases/1.8.txt +++ b/docs/releases/1.8.txt @@ -60,9 +60,10 @@ New data types * Django now has a :class:`~django.db.models.DurationField` for storing periods of time - modeled in Python by :class:`~python:datetime.timedelta`. It is - stored in the native ``interval`` data type on PostgreSQL and as a ``bigint`` - of microseconds on other backends. Date and time related arithmetic has also - been improved on all backends. There is a corresponding :class:`form field + stored in the native ``interval`` data type on PostgreSQL, as a ``INTERVAL + DAY(9) TO SECOND(6)`` on Oracle, and as a ``bigint`` of microseconds on other + backends. Date and time related arithmetic has also been improved on all + backends. There is a corresponding :class:`form field <django.forms.DurationField>`. Query Expressions |
