diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 9b0778baa99..396eaa5d550 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -12678,12 +12678,13 @@ NULL baz(3 rows)
General-Purpose Aggregate Functions
-
+
Function
Argument Type(s)
Return Type
+ Partial Mode
Description
@@ -12702,6 +12703,7 @@ NULL baz(3 rows)
array of the argument type
+ No
input values, including nulls, concatenated into an array
@@ -12715,6 +12717,7 @@ NULL baz(3 rows)
same as argument data type
+ No
input arrays concatenated into array of one higher dimension
(inputs must all have same dimensionality,
and cannot be empty or NULL)
@@ -12740,6 +12743,7 @@ NULL baz(3 rows)
double precision for a floating-point argument,
otherwise the same as the argument data type
+ All types apart from floating-point types
the average (arithmetic mean) of all input values
@@ -12757,6 +12761,7 @@ NULL baz(3 rows)
same as argument data type
+ Yes
the bitwise AND of all non-null input values, or null if none
@@ -12774,6 +12779,7 @@ NULL baz(3 rows)
same as argument data type
+ Yes
the bitwise OR of all non-null input values, or null if none
@@ -12790,6 +12796,7 @@ NULL baz(3 rows)
bool
+ Yes
true if all input values are true, otherwise false
@@ -12806,6 +12813,7 @@ NULL baz(3 rows)
bool
+ Yes
true if at least one input value is true, otherwise false
@@ -12818,6 +12826,7 @@ NULL baz(3 rows)
bigint
+ Yes
number of input rows
@@ -12825,6 +12834,7 @@ NULL baz(3 rows)
count(expression)
any
bigint
+ Yes
number of input rows for which the value of expression is not null
@@ -12844,6 +12854,7 @@ NULL baz(3 rows)
bool
+ Yes
equivalent to bool_and
@@ -12860,6 +12871,7 @@ NULL baz(3 rows)
json
+ No
aggregates values as a JSON array
@@ -12876,6 +12888,7 @@ NULL baz(3 rows)
jsonb
+ No
aggregates values as a JSON array
@@ -12892,6 +12905,7 @@ NULL baz(3 rows)
json
+ No
aggregates name/value pairs as a JSON object
@@ -12908,6 +12922,7 @@ NULL baz(3 rows)
jsonb
+ No
aggregates name/value pairs as a JSON object
@@ -12921,6 +12936,7 @@ NULL baz(3 rows)
any numeric, string, date/time, network, or enum type,
or arrays of these types
same as argument type
+ Yes
maximum value of expression across all input
@@ -12938,6 +12954,7 @@ NULL baz(3 rows)
any numeric, string, date/time, network, or enum type,
or arrays of these types
same as argument type
+ Yes
minimum value of expression across all input
@@ -12961,6 +12978,7 @@ NULL baz(3 rows)
same as argument types
+ No
input values concatenated into a string, separated by delimiter
@@ -12983,6 +13001,7 @@ NULL baz(3 rows)
bigint arguments, otherwise the same as the
argument data type
+ All types apart from floating-point types
sum of expression across all input values
@@ -12999,6 +13018,7 @@ NULL baz(3 rows)
xml
+ No
concatenation of XML values (see also )
@@ -13015,6 +13035,12 @@ NULL baz(3 rows)
substitute zero or an empty array for null when necessary.
+
+ Aggregate functions which support Partial Mode
+ are eligible to participate in various optimizations, such as parallel
+ aggregation.
+
+
ANY
@@ -13098,12 +13124,13 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab;
Aggregate Functions for Statistics
-
+
Function
Argument Type
Return Type
+ Partial Mode
Description
@@ -13126,6 +13153,7 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab;
double precision
+ No
correlation coefficient
@@ -13146,6 +13174,7 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab;
double precision
+ No
population covariance
@@ -13166,6 +13195,7 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab;
double precision
+ No
sample covariance
@@ -13182,6 +13212,7 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab;
double precision
+ No
average of the independent variable
(sum(X)/N)
@@ -13199,6 +13230,7 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab;
double precision
+ No
average of the dependent variable
(sum(Y)/N)
@@ -13216,6 +13248,7 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab;
bigint
+ No
number of input rows in which both expressions are nonnull
@@ -13235,6 +13268,7 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab;
double precision
+ No
y-intercept of the least-squares-fit linear equation
determined by the (X,
double precision
+ No
square of the correlation coefficient
@@ -13273,6 +13308,7 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab;
double precision
+ No
slope of the least-squares-fit linear equation determined
by the (X,
Y) pairs
@@ -13291,6 +13327,7 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab;
double precision
+ No
sum(X^2) - sum(X)^2/
double precision
+ No
sum(X*Y) - sum(
double precision
+ No
sum(Y^2) - sum(Y)^2/double precision for floating-point arguments,
otherwise numeric
+ All types apart from floating-point types
historical alias for stddev_samp
@@ -13383,6 +13423,7 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab;
double precision for floating-point arguments,
otherwise numeric
+ All types apart from floating-point types
population standard deviation of the input values
@@ -13406,6 +13447,7 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab;
double precision for floating-point arguments,
otherwise numeric
+ All types apart from floating-point types
sample standard deviation of the input values
@@ -13425,6 +13467,7 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab;
double precision for floating-point arguments,
otherwise numeric
+ All types apart from floating-point types
historical alias for var_samp
@@ -13448,6 +13491,7 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab;
double precision for floating-point arguments,
otherwise numeric
+ All types apart from floating-point types
population variance of the input values (square of the population standard deviation)
@@ -13471,6 +13515,7 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab;
double precision for floating-point arguments,
otherwise numeric
+ All types apart from floating-point types
sample variance of the input values (square of the sample standard deviation)
@@ -13495,13 +13540,14 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab;
Ordered-Set Aggregate Functions
-
+
Function
Direct Argument Type(s)
Aggregated Argument Type(s)
Return Type
+ Partial Mode
Description
@@ -13524,6 +13570,7 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab;
same as sort expression
+ No
returns the most frequent input value (arbitrarily choosing the first
one if there are multiple equally-frequent results)
@@ -13550,6 +13597,7 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab;
same as sort expression
+ No
continuous percentile: returns a value corresponding to the specified
fraction in the ordering, interpolating between adjacent input items if
@@ -13570,6 +13618,7 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab;
array of sort expression's type
+ No
multiple continuous percentile: returns an array of results matching
the shape of the fractions parameter, with each
@@ -13594,6 +13643,7 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab;
same as sort expression
+ No
discrete percentile: returns the first input value whose position in
the ordering equals or exceeds the specified fraction
@@ -13613,6 +13663,7 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab;
array of sort expression's type
+ No
multiple discrete percentile: returns an array of results matching the
shape of the fractions parameter, with each non-null
@@ -13651,13 +13702,14 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab;
Hypothetical-Set Aggregate Functions
-
+
Function
Direct Argument Type(s)
Aggregated Argument Type(s)
Return Type
+ Partial Mode
Description
@@ -13681,6 +13733,7 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab;
bigint
+ No
rank of the hypothetical row, with gaps for duplicate rows
@@ -13703,6 +13756,7 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab;
bigint
+ No
rank of the hypothetical row, without gaps
@@ -13725,6 +13779,7 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab;
double precision
+ No
relative rank of the hypothetical row, ranging from 0 to 1
@@ -13747,6 +13802,7 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab;
double precision
+ No
relative rank of the hypothetical row, ranging from
1/N> to 1