From 72a86ceb33749d4fd17d3d2910e19b9d9ca1643b Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Thu, 11 May 2023 18:22:55 +0200 Subject: Fixed #34558 -- Fixed QuerySet.bulk_create() crash with Now() on Oracle. --- docs/ref/models/database-functions.txt | 10 ++++++++++ docs/releases/5.0.txt | 3 +++ 2 files changed, 13 insertions(+) (limited to 'docs') diff --git a/docs/ref/models/database-functions.txt b/docs/ref/models/database-functions.txt index 13b70d76cd..f22a7ae386 100644 --- a/docs/ref/models/database-functions.txt +++ b/docs/ref/models/database-functions.txt @@ -562,11 +562,21 @@ Usage example: ``Now()`` uses ``STATEMENT_TIMESTAMP`` instead. If you need the transaction timestamp, use :class:`django.contrib.postgres.functions.TransactionNow`. +.. admonition:: Oracle + + On Oracle, the SQL ``LOCALTIMESTAMP`` is used to avoid issues with casting + ``CURRENT_TIMESTAMP`` to ``DateTimeField``. + .. versionchanged:: 4.2 Support for microsecond precision on MySQL and millisecond precision on SQLite were added. +.. versionchanged:: 5.0 + + In older versions, the SQL ``CURRENT_TIMESTAMP`` was used on Oracle instead + of ``LOCALTIMESTAMP``. + ``Trunc`` --------- diff --git a/docs/releases/5.0.txt b/docs/releases/5.0.txt index b1e09dab46..f23f39b014 100644 --- a/docs/releases/5.0.txt +++ b/docs/releases/5.0.txt @@ -382,6 +382,9 @@ Miscellaneous * ``ImageField.update_dimension_fields()`` is no longer called on the ``post_init`` signal if ``width_field`` and ``height_field`` are not set. +* :class:`~django.db.models.functions.Now` database function now uses + ``LOCALTIMESTAMP`` instead of ``CURRENT_TIMESTAMP`` on Oracle. + .. _deprecated-features-5.0: Features deprecated in 5.0 -- cgit v1.3