summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorArtur Beltsov <artur1998g@gmail.com>2020-11-04 16:30:47 +0500
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-11-04 21:22:54 +0100
commit18c8ced81e4a6e093c732f8cded3b16426d16952 (patch)
tree8e46d2a055bc61bc80ee20c5c9afbc6b4bfd43e5 /docs
parentc36075ac1dddfa986340b1a5e15fe48833322372 (diff)
Fixed #32169 -- Added distinct support to JSONBAgg.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/contrib/postgres/aggregates.txt9
-rw-r--r--docs/releases/3.2.txt3
2 files changed, 11 insertions, 1 deletions
diff --git a/docs/ref/contrib/postgres/aggregates.txt b/docs/ref/contrib/postgres/aggregates.txt
index 31202d5304..c309dcad14 100644
--- a/docs/ref/contrib/postgres/aggregates.txt
+++ b/docs/ref/contrib/postgres/aggregates.txt
@@ -114,10 +114,17 @@ General-purpose aggregation functions
``JSONBAgg``
------------
-.. class:: JSONBAgg(expressions, filter=None, ordering=(), **extra)
+.. class:: JSONBAgg(expressions, distinct=False, filter=None, ordering=(), **extra)
Returns the input values as a ``JSON`` array.
+ .. attribute:: distinct
+
+ .. versionadded:: 3.2
+
+ An optional boolean argument that determines if array values will be
+ distinct. Defaults to ``False``.
+
.. attribute:: ordering
.. versionadded:: 3.2
diff --git a/docs/releases/3.2.txt b/docs/releases/3.2.txt
index ca427c3bc5..e76223f6d4 100644
--- a/docs/releases/3.2.txt
+++ b/docs/releases/3.2.txt
@@ -131,6 +131,9 @@ Minor features
* The new :attr:`.JSONBAgg.ordering` attribute determines the ordering of the
aggregated elements.
+* The new :attr:`.JSONBAgg.distinct` attribute determines if aggregated values
+ will be distinct.
+
* The :class:`~django.contrib.postgres.operations.CreateExtension` operation
now checks that the extension already exists in the database and skips the
migration if so.