Re: string_agg delimiter having no effect with order by
От | Tom Lane |
---|---|
Тема | Re: string_agg delimiter having no effect with order by |
Дата | |
Msg-id | 2631.1281023222@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: string_agg delimiter having no effect with order by (Pavel Stehule <pavel.stehule@gmail.com>) |
Ответы |
Re: string_agg delimiter having no effect with order by
|
Список | pgsql-bugs |
Pavel Stehule <pavel.stehule@gmail.com> writes: > but still when we remove one parametric string_agg, then this issue > will not be documented. How so? This paragraph will still be there: <para> When dealing with multiple-argument aggregate functions, note that the <literal>ORDER BY</> clause goes after all the aggregate arguments. For example, this: <programlisting> SELECT string_agg(a, ',' ORDER BY a) FROM table; </programlisting> not this: <programlisting> SELECT string_agg(a ORDER BY a, ',') FROM table; -- incorrect </programlisting> 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> regards, tom lane
В списке pgsql-bugs по дате отправления: