Re: string_agg delimiter having no effect with order by

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: string_agg delimiter having no effect with order by
Дата
Msg-id AANLkTikRU+165S6QQM60W1Gk-CtYtEdEkiOtPgWLYDJp@mail.gmail.com
обсуждение исходный текст
Ответ на Re: string_agg delimiter having no effect with order by  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
2010/8/5 Tom Lane <tgl@sss.pgh.pa.us>:
> 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? =C2=A0This paragraph will still be there:
>
> =C2=A0 <para>
> =C2=A0 =C2=A0When dealing with multiple-argument aggregate functions, not=
e that the
> =C2=A0 =C2=A0<literal>ORDER BY</> clause goes after all the aggregate arg=
uments.
> =C2=A0 =C2=A0For example, this:
> <programlisting>
> SELECT string_agg(a, ',' ORDER BY a) FROM table;
> </programlisting>
> =C2=A0 =C2=A0not this:
> <programlisting>
> SELECT string_agg(a ORDER BY a, ',') FROM table; =C2=A0-- incorrect
> </programlisting>
> =C2=A0 =C2=A0The latter is syntactically valid, but it represents a call =
of a
> =C2=A0 =C2=A0single-argument aggregate function with two <literal>ORDER B=
Y</> keys
> =C2=A0 =C2=A0(the second one being rather useless since it's a constant).
> =C2=A0 </para>
>
>
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0regards, tom lane
>

ok

Regards

Pavel Stehule

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Thom Brown
Дата:
Сообщение: Re: string_agg delimiter having no effect with order by
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: BUG #5599: Vacuum fails due to index corruption issues