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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alex Hunsaker <badalex(at)gmail(dot)com>
Cc: Thom Brown <thom(at)linux(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] Drop one-argument string_agg? (was Re: string_agg delimiter having no effect with order by)
Date: 2010-08-04 23:07:40
Message-ID: 16862.1280963260@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Alex Hunsaker <badalex(at)gmail(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Mark Kirkwood 2010-08-04 23:14:07 Re: BUG #5595: Documentation is not installs from VPATH build.
Previous Message Alex Hunsaker 2010-08-04 22:57:25 Re: [HACKERS] Drop one-argument string_agg? (was Re: string_agg delimiter having no effect with order by)

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-08-04 23:16:55 Re: more numeric stuff
Previous Message Tom Lane 2010-08-04 23:00:15 Re: Two different methods of sneaking non-immutable data into an index