Re: Drop one-argument string_agg? (was Re: [BUGS] string_agg delimiter having no effect with order by)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Drop one-argument string_agg? (was Re: [BUGS] string_agg delimiter having no effect with order by)
Дата
Msg-id 16862.1280963260@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Drop one-argument string_agg? (was Re: [BUGS] string_agg delimiter having no effect with order by)  (Alex Hunsaker <badalex@gmail.com>)
Ответы Re: Drop one-argument string_agg? (was Re: [BUGS] string_agg delimiter having no effect with order by)  (Robert Haas <robertmhaas@gmail.com>)
Re: Drop one-argument string_agg? (was Re: [BUGS] string_agg delimiter having no effect with order by)  (Alex Hunsaker <badalex@gmail.com>)
Список pgsql-hackers
Alex Hunsaker <badalex@gmail.com> writes:
> I dunno about anyone else but (a, ',' order by a) just looks weird.

I suppose, but aren't you just focusing on the argument being constant?
In the more general case I don't think there's anything unnatural about
this syntax.

> Or in other words, any thoughts on:
> select string_agg(delim, expression);

That looks pretty weird to me anyway, with or without use of ORDER BY.
Nobody would think to write the delimiter first.  Usually you put the
"most important" argument first, and no one would see the delimiter
as the most important one.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Two different methods of sneaking non-immutable data into an index
Следующее
От: Robert Haas
Дата:
Сообщение: Re: more numeric stuff