Re: Bug with ordering aggregates? - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: Bug with ordering aggregates?
Date
Msg-id 20100518164217.GI21875@tamriel.snowman.net
Whole thread Raw
In response to Re: Bug with ordering aggregates?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Bug with ordering aggregates?
List pgsql-hackers
* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> Stephen Frost <sfrost@snowman.net> writes:
> >   This doesn't seem right to me:
>
> > postgres=# select
> > postgres-# string_agg(column1::text order by column1 asc,',')
> > postgres-# from (values (3),(4),(1),(2)) a;
> >  string_agg
> > ------------
> >  1234
> > (1 row)
>
> Looks fine to me: you have two ordering columns (the second rather
> useless,  but that's no matter).

Ah, yeah, guess I'll just complain that having the order by look like
it's an argument to an aggregate makes things confusing.  Not much to be
done about it though.
Thanks,
    Stephen

pgsql-hackers by date:

Previous
From: Thom Brown
Date:
Subject: Re: Bug with ordering aggregates?
Next
From: Stephen Frost
Date:
Subject: Documentation Bug/Misnomer?