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: Robert Haas <robertmhaas(at)gmail(dot)com>, Thom Brown <thom(at)linux(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-05 18:43:42
Message-ID: AANLkTinpaJg9qZoJKV8EP-oWeg-D49g3ZHeSaw==4vOO@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Thu, Aug 5, 2010 at 12:25, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> regression=# select string_agg(f1 order by f1, ',') from text_tbl;
> ERROR:  function string_agg(text) does not exist
> LINE 1: select string_agg(f1 order by f1, ',') from text_tbl;
>               ^
> HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
>
> It's not perfect (I don't think it's practical to get the HINT to
> read "Put the ORDER BY at the end" ;-)) but at least it should
> get people pointed in the right direction when they do this.

Not to mention I think most of the confusion came from using the 1
argument version first (with an order by) and then jumping straight to
the 2 arg version.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2010-08-05 18:45:49 Re: [HACKERS] Drop one-argument string_agg? (was Re: string_agg delimiter having no effect with order by)
Previous Message Thom Brown 2010-08-05 18:42:28 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 Merlin Moncure 2010-08-05 18:44:50 Re: remove upsert example from docs
Previous Message Kevin Grittner 2010-08-05 18:42:54 CommitFest 2010-07 week three progress report