mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
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.
This commit is contained in:
@ -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>
|
||||
@ -9836,6 +9840,25 @@ SELECT NULLIF(value, '(none)') ...
|
||||
</entry>
|
||||
</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>
|
||||
|
Reference in New Issue
Block a user