]> granicus.if.org Git - postgresql/commitdiff
Fix documentation of argument type of json_agg and jsonb_agg
authorAndrew Dunstan <andrew@dunslane.net>
Mon, 22 Dec 2014 19:12:06 +0000 (14:12 -0500)
committerAndrew Dunstan <andrew@dunslane.net>
Mon, 22 Dec 2014 19:12:06 +0000 (14:12 -0500)
json_agg was originally designed to aggregate records. However, it soon
became clear that it is useful for aggregating all kinds of values and
that's what we have on 9.3 and 9.4, and in head for it and jsonb_agg.
The documentation suggested otherwise, so this fixes it.

doc/src/sgml/func.sgml

index 6f3094656c2107b2c179d27fa8a843edb906721c..c6c3bf80171bb95245d7d32ab1df8186607e384a 100644 (file)
@@ -12230,15 +12230,15 @@ NULL baz</literallayout>(3 rows)</entry>
        <indexterm>
         <primary>json_agg</primary>
        </indexterm>
-       <function>json_agg(<replaceable class="parameter">record</replaceable>)</function>
+       <function>json_agg(<replaceable class="parameter">expression</replaceable>)</function>
       </entry>
       <entry>
-       <type>record</type>
+       <type>expression</type>
       </entry>
       <entry>
        <type>json</type>
       </entry>
-      <entry>aggregates records as a JSON array of objects</entry>
+      <entry>aggregates values as a JSON array</entry>
      </row>
 
      <row>
@@ -12246,15 +12246,15 @@ NULL baz</literallayout>(3 rows)</entry>
        <indexterm>
         <primary>jsonb_agg</primary>
        </indexterm>
-       <function>jsonb_agg(<replaceable class="parameter">record</replaceable>)</function>
+       <function>jsonb_agg(<replaceable class="parameter">expression</replaceable>)</function>
       </entry>
       <entry>
-       <type>record</type>
+       <type>expression</type>
       </entry>
       <entry>
        <type>jsonb</type>
       </entry>
-      <entry>aggregates records as a JSON array of objects</entry>
+      <entry>aggregates values as a JSON array</entry>
      </row>
 
      <row>