summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorItagaki Takahiro <itagaki.takahiro@gmail.com>2010-02-01 03:14:45 +0000
committerItagaki Takahiro <itagaki.takahiro@gmail.com>2010-02-01 03:14:45 +0000
commit9ea9918e37689fbc9ed43532b8828652b5ea90cd (patch)
treef512d7e150549dd403f0266374d7dbcfa460d8ed /doc/src
parentee3a81f0a03d0da128689df92a84a24a337645ec (diff)
Add string_agg aggregate functions. The one argument version concatenates
the input values into a string. The two argument version also does the same thing, but inserts delimiters between elements. Original patch by Pavel Stehule, reviewed by David E. Wheeler and me.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/func.sgml25
1 files changed, 24 insertions, 1 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index f777f9f1650..bd1bf352206 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -1,4 +1,4 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.498 2010/01/25 20:55:32 tgl Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.499 2010/02/01 03:14:43 itagaki Exp $ -->
<chapter id="functions">
<title>Functions and Operators</title>
@@ -1789,6 +1789,10 @@
</tgroup>
</table>
+ <para>
+ See also <xref linkend="functions-aggregate"> about the aggregate
+ function <function>string_agg</function>.
+ </para>
<table id="conversion-names">
<title>Built-in Conversions</title>
@@ -9837,6 +9841,25 @@ SELECT NULLIF(value, '(none)') ...
</row>
<row>
+ <entry>
+ <indexterm>
+ <primary>string_agg</primary>
+ </indexterm>
+ <function>
+ string_agg(<replaceable class="parameter">expression</replaceable>
+ [, <replaceable class="parameter">delimiter</replaceable> ] )
+ </function>
+ </entry>
+ <entry>
+ <type>text</type>
+ </entry>
+ <entry>
+ <type>text</type>
+ </entry>
+ <entry>input values concatenated into a string, optionally with delimiters</entry>
+ </row>
+
+ <row>
<entry><function>sum(<replaceable class="parameter">expression</replaceable>)</function></entry>
<entry>
<type>smallint</type>, <type>int</type>,