Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite352a00

Browse files
committed
Doc: clarify behavior of standard aggregates for null inputs.
Section 4.2.7 says that unless otherwise specified, built-inaggregates ignore rows in which any input is null. This isnot true of the JSON aggregates, but it wasn't documented.Fix that.Of the other entries in table 9.55, some were explicit aboutignoring nulls, and some weren't; for consistency andself-contained-ness, make them all say it explicitly.Per bug #15884 from Tim Möhlmann. Back-patch to all supportedbranches.Discussion:https://postgr.es/m/15884-c32d848f787fcae3@postgresql.org
1 parentcf86803 commite352a00

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

‎doc/src/sgml/func.sgml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13513,7 +13513,7 @@ NULL baz</literallayout>(3 rows)</entry>
1351313513
<entry>No</entry>
1351413514
<entry>input arrays concatenated into array of one higher dimension
1351513515
(inputs must all have same dimensionality,
13516-
and cannot be empty orNULL)</entry>
13516+
and cannot be empty ornull)</entry>
1351713517
</row>
1351813518

1351913519
<row>
@@ -13537,7 +13537,7 @@ NULL baz</literallayout>(3 rows)</entry>
1353713537
otherwise the same as the argument data type
1353813538
</entry>
1353913539
<entry>Yes</entry>
13540-
<entry>the average (arithmetic mean) of all input values</entry>
13540+
<entry>the average (arithmetic mean) of allnon-nullinput values</entry>
1354113541
</row>
1354213542

1354313543
<row>
@@ -13665,7 +13665,7 @@ NULL baz</literallayout>(3 rows)</entry>
1366513665
<type>json</type>
1366613666
</entry>
1366713667
<entry>No</entry>
13668-
<entry>aggregates values as a JSON array</entry>
13668+
<entry>aggregates values, including nulls, as a JSON array</entry>
1366913669
</row>
1367013670

1367113671
<row>
@@ -13682,7 +13682,7 @@ NULL baz</literallayout>(3 rows)</entry>
1368213682
<type>jsonb</type>
1368313683
</entry>
1368413684
<entry>No</entry>
13685-
<entry>aggregates values as a JSON array</entry>
13685+
<entry>aggregates values, including nulls, as a JSON array</entry>
1368613686
</row>
1368713687

1368813688
<row>
@@ -13699,7 +13699,8 @@ NULL baz</literallayout>(3 rows)</entry>
1369913699
<type>json</type>
1370013700
</entry>
1370113701
<entry>No</entry>
13702-
<entry>aggregates name/value pairs as a JSON object</entry>
13702+
<entry>aggregates name/value pairs as a JSON object; values can be
13703+
null, but not names</entry>
1370313704
</row>
1370413705

1370513706
<row>
@@ -13716,7 +13717,8 @@ NULL baz</literallayout>(3 rows)</entry>
1371613717
<type>jsonb</type>
1371713718
</entry>
1371813719
<entry>No</entry>
13719-
<entry>aggregates name/value pairs as a JSON object</entry>
13720+
<entry>aggregates name/value pairs as a JSON object; values can be
13721+
null, but not names</entry>
1372013722
</row>
1372113723

1372213724
<row>
@@ -13732,7 +13734,7 @@ NULL baz</literallayout>(3 rows)</entry>
1373213734
<entry>Yes</entry>
1373313735
<entry>
1373413736
maximum value of <replaceable
13735-
class="parameter">expression</replaceable> across all input
13737+
class="parameter">expression</replaceable> across allnon-nullinput
1373613738
values
1373713739
</entry>
1373813740
</row>
@@ -13750,7 +13752,7 @@ NULL baz</literallayout>(3 rows)</entry>
1375013752
<entry>Yes</entry>
1375113753
<entry>
1375213754
minimum value of <replaceable
13753-
class="parameter">expression</replaceable> across all input
13755+
class="parameter">expression</replaceable> across allnon-nullinput
1375413756
values
1375513757
</entry>
1375613758
</row>
@@ -13772,7 +13774,7 @@ NULL baz</literallayout>(3 rows)</entry>
1377213774
same as argument types
1377313775
</entry>
1377413776
<entry>No</entry>
13775-
<entry>input values concatenated into a string, separated by delimiter</entry>
13777+
<entry>non-nullinput values concatenated into a string, separated by delimiter</entry>
1377613778
</row>
1377713779

1377813780
<row>
@@ -13795,7 +13797,8 @@ NULL baz</literallayout>(3 rows)</entry>
1379513797
argument data type
1379613798
</entry>
1379713799
<entry>Yes</entry>
13798-
<entry>sum of <replaceable class="parameter">expression</replaceable> across all input values</entry>
13800+
<entry>sum of <replaceable class="parameter">expression</replaceable>
13801+
across all non-null input values</entry>
1379913802
</row>
1380013803

1380113804
<row>
@@ -13812,7 +13815,8 @@ NULL baz</literallayout>(3 rows)</entry>
1381213815
<type>xml</type>
1381313816
</entry>
1381413817
<entry>No</entry>
13815-
<entry>concatenation of XML values (see also <xref linkend="functions-xml-xmlagg"/>)</entry>
13818+
<entry>concatenation of non-null XML values
13819+
(see also <xref linkend="functions-xml-xmlagg"/>)</entry>
1381613820
</row>
1381713821
</tbody>
1381813822
</tgroup>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp