diff options
Diffstat (limited to 'doc/src')
| -rw-r--r-- | doc/src/sgml/func.sgml | 12 | ||||
| -rw-r--r-- | doc/src/sgml/syntax.sgml | 11 |
2 files changed, 12 insertions, 11 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 1e12b6c8685..37130fe8b1e 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.521.2.1 2010/07/29 19:34:36 petere Exp $ --> +<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.521.2.2 2010/08/05 18:21:29 tgl Exp $ --> <chapter id="functions"> <title>Functions and Operators</title> @@ -9731,7 +9731,7 @@ SELECT NULLIF(value, '(none)') ... <thead> <row> <entry>Function</entry> - <entry>Argument Type</entry> + <entry>Argument Type(s)</entry> <entry>Return Type</entry> <entry>Description</entry> </row> @@ -9901,17 +9901,17 @@ SELECT NULLIF(value, '(none)') ... <primary>string_agg</primary> </indexterm> <function> - string_agg(<replaceable class="parameter">expression</replaceable> - [, <replaceable class="parameter">delimiter</replaceable> ] ) + string_agg(<replaceable class="parameter">expression</replaceable>, + <replaceable class="parameter">delimiter</replaceable>) </function> </entry> <entry> - <type>text</type> + <type>text</type>, <type>text</type> </entry> <entry> <type>text</type> </entry> - <entry>input values concatenated into a string, optionally with delimiters</entry> + <entry>input values concatenated into a string, separated by delimiter</entry> </row> <row> diff --git a/doc/src/sgml/syntax.sgml b/doc/src/sgml/syntax.sgml index 0c1f2068b18..a86fa26c306 100644 --- a/doc/src/sgml/syntax.sgml +++ b/doc/src/sgml/syntax.sgml @@ -1,4 +1,4 @@ -<!-- $PostgreSQL: pgsql/doc/src/sgml/syntax.sgml,v 1.147.2.1 2010/08/04 22:31:55 tgl Exp $ --> +<!-- $PostgreSQL: pgsql/doc/src/sgml/syntax.sgml,v 1.147.2.2 2010/08/05 18:21:29 tgl Exp $ --> <chapter id="sql-syntax"> <title>SQL Syntax</title> @@ -1584,16 +1584,17 @@ SELECT array_agg(a ORDER BY b DESC) FROM table; <para> When dealing with multiple-argument aggregate functions, note that the <literal>ORDER BY</> clause goes after all the aggregate arguments. - For example, this: + For example, write this: <programlisting> SELECT string_agg(a, ',' ORDER BY a) FROM table; </programlisting> not this: <programlisting> -SELECT string_agg(a ORDER BY a, ',') FROM table; -- not what you want +SELECT string_agg(a ORDER BY a, ',') FROM table; -- incorrect </programlisting> - The latter syntax will be accepted, but <literal>','</> will be - treated as a (useless) sort key. + The latter is syntactically valid, but it represents a call of a + single-argument aggregate function with two <literal>ORDER BY</> keys + (the second one being rather useless since it's a constant). </para> <para> |
