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

From Alex Hunsaker
Subject Re: Drop one-argument string_agg? (was Re: [BUGS] string_agg delimiter having no effect with order by)
Date
Msg-id AANLkTinpaJg9qZoJKV8EP-oWeg-D49g3ZHeSaw==4vOO@mail.gmail.com
Whole thread Raw
In response to Re: Drop one-argument string_agg? (was Re: [BUGS] string_agg delimiter having no effect with order by)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, Aug 5, 2010 at 12:25, Tom Lane <tgl@sss.pgh.pa.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.


pgsql-hackers by date:

Previous
From: Thom Brown
Date:
Subject: Re: Drop one-argument string_agg? (was Re: [BUGS] string_agg delimiter having no effect with order by)
Next
From: Merlin Moncure
Date:
Subject: Re: remove upsert example from docs