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

From: Alex Hunsaker <badalex(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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:18:31
Message-ID: AANLkTinNY9O=4WEy1eru7uePu3_57=pd0jTK+jFYM8w-@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Wed, Aug 4, 2010 at 17:07, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> 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?

Yes.

>> 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.

No argument about the most important arg first. I think we have a
difference of opinion on what the important argument is :-)

It might just be my perl upbringing talking, for example you join(',',
...) or split(',', ....) in perl.

Either way *shrug* Im happy to leave it alone.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Robert Haas 2010-08-04 23:19:01 Re: [HACKERS] Drop one-argument string_agg? (was Re: string_agg delimiter having no effect with order by)
Previous Message Robert Haas 2010-08-04 23:18:02 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:19:01 Re: [HACKERS] Drop one-argument string_agg? (was Re: string_agg delimiter having no effect with order by)
Previous Message Robert Haas 2010-08-04 23:18:02 Re: [HACKERS] Drop one-argument string_agg? (was Re: string_agg delimiter having no effect with order by)