summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Walls <jacobtylerwalls@gmail.com>2026-02-09 18:27:23 -0500
committerJacob Walls <jacobtylerwalls@gmail.com>2026-02-10 09:47:09 -0500
commitb5b22010b5d5c9e9bb57f269eeeeace23cf76cb5 (patch)
treed11f4705a5fbe0a43c205623f4f681f3980b8210
parent7bc9d39fbdae6c09f630c6e5d51ea4ad2484fc46 (diff)
[6.0.x] Refs #35444 -- Doc'd deprecation in contrib.postgres.aggreggates.StringAgg.delimiter.
Backport of 3c09ed81d3e90d7ce60372096c58e80548d1d2ef from main.
-rw-r--r--docs/ref/contrib/postgres/aggregates.txt13
-rw-r--r--docs/releases/6.0.txt7
2 files changed, 19 insertions, 1 deletions
diff --git a/docs/ref/contrib/postgres/aggregates.txt b/docs/ref/contrib/postgres/aggregates.txt
index 835d3a7862..57832c91fc 100644
--- a/docs/ref/contrib/postgres/aggregates.txt
+++ b/docs/ref/contrib/postgres/aggregates.txt
@@ -204,7 +204,18 @@ General-purpose aggregation functions
.. attribute:: delimiter
- Required argument. Needs to be a string.
+ Required argument. A string, :class:`~django.db.models.Value`, or
+ expression representing the string for separating values. For example,
+ ``Value(",")``.
+
+ .. versionadded:: 6.0
+
+ Support for providing a ``Value`` or expression rather than a
+ string was added.
+
+ .. deprecated:: 6.0
+
+ Support for providing a string is deprecated.
.. attribute:: distinct
diff --git a/docs/releases/6.0.txt b/docs/releases/6.0.txt
index ff810b0354..bfad64e485 100644
--- a/docs/releases/6.0.txt
+++ b/docs/releases/6.0.txt
@@ -517,6 +517,13 @@ Miscellaneous
* The PostgreSQL ``StringAgg`` class is deprecated in favor of the generally
available :class:`~django.db.models.StringAgg` class.
+* Passing a string to the
+ :attr:`~django.contrib.postgres.aggregates.StringAgg.delimiter` argument of
+ the (deprecated) PostgreSQL ``StringAgg`` class is deprecated. Use a
+ :class:`~django.db.models.Value` or expression instead to prepare for
+ compatibility with the generally available
+ :class:`~django.db.models.StringAgg` class.
+
* The PostgreSQL ``OrderableAggMixin`` is deprecated in favor of the
``order_by`` attribute now available on the
:class:`~django.db.models.Aggregate` class.