diff options
author | Nick Pope <nick@nickpope.me.uk> | 2021-06-30 00:08:27 +0100 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-07-19 13:41:16 +0200 |
commit | fee87345967b3d917b618533585076cbfa43451b (patch) | |
tree | 202561eec2284ce1bd3ae4793d32ac346b068848 /docs/releases/4.0.txt | |
parent | 501a8db46595b2d5b99c1d3b1146a832f43cdf1c (diff) | |
download | django-fee87345967b3d917b618533585076cbfa43451b.tar.gz |
Refs #10929 -- Deprecated forced empty result value for PostgreSQL aggregates.
This deprecates forcing a return value for ArrayAgg, JSONBAgg, and
StringAgg when there are no rows in the query. Now that we have a
``default`` argument for aggregates, we want to revert to returning the
default of ``None`` which most aggregate functions return and leave it
up to the user to decide what they want to be returned by default.
Diffstat (limited to 'docs/releases/4.0.txt')
-rw-r--r-- | docs/releases/4.0.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/releases/4.0.txt b/docs/releases/4.0.txt index 4122c9b419..244f113c54 100644 --- a/docs/releases/4.0.txt +++ b/docs/releases/4.0.txt @@ -540,6 +540,13 @@ Miscellaneous * The ``extra_tests`` argument for :meth:`.DiscoverRunner.build_suite` and :meth:`.DiscoverRunner.run_tests` is deprecated. +* The :class:`~django.contrib.postgres.aggregates.ArrayAgg`, + :class:`~django.contrib.postgres.aggregates.JSONBAgg`, and + :class:`~django.contrib.postgres.aggregates.StringAgg` aggregates will return + ``None`` when there are no rows instead of ``[]``, ``[]``, and ``''`` + respectively in Django 5.0. If you need the previous behavior, explicitly set + ``default`` to ``Value([])``, ``Value('[]')``, or ``Value('')``. + Features removed in 4.0 ======================= |