summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2019-09-08 23:25:53 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2019-09-14 17:23:08 +0200
commitc2057205d9f30247e9d512d42114f27d0a93a96e (patch)
treefdbbc26bf5ecb17d0392216872d47a5393a60ccc /docs/ref
parente0bb9092d14d7b43be20b8a61eafbd0e957f91f9 (diff)
[3.0.x] Fixed #29823 -- Doc'd limitation of DecimalField on SQLite.
Backport of b8dff52f440adfb78b40e19ee8bff45373ca2501 from master
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/databases.txt12
-rw-r--r--docs/ref/models/fields.txt4
2 files changed, 15 insertions, 1 deletions
diff --git a/docs/ref/databases.txt b/docs/ref/databases.txt
index 1d11112d79..d0eed1ecc4 100644
--- a/docs/ref/databases.txt
+++ b/docs/ref/databases.txt
@@ -677,6 +677,18 @@ substring filtering.
.. _documented at sqlite.org: https://www.sqlite.org/faq.html#q18
+.. _sqlite-decimal-handling:
+
+Decimal handling
+----------------
+
+SQLite has no real decimal internal type. Decimal values are internally
+converted to the ``REAL`` data type (8-byte IEEE floating point number), as
+explained in the `SQLite datatypes documentation`__, so they don't support
+correctly-rounded decimal floating point arithmetic.
+
+__ https://www.sqlite.org/datatype3.html#storage_classes_and_datatypes
+
"Database is locked" errors
---------------------------
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt
index b6afd23dc2..ac21380db2 100644
--- a/docs/ref/models/fields.txt
+++ b/docs/ref/models/fields.txt
@@ -715,7 +715,9 @@ when :attr:`~django.forms.Field.localize` is ``False`` or
For more information about the differences between the
:class:`FloatField` and :class:`DecimalField` classes, please
- see :ref:`FloatField vs. DecimalField <floatfield_vs_decimalfield>`.
+ see :ref:`FloatField vs. DecimalField <floatfield_vs_decimalfield>`. You
+ should also be aware of :ref:`SQLite limitations <sqlite-decimal-handling>`
+ of decimal fields.
``DurationField``
-----------------