On Nov 7, 2005, at 17:47 , David Fetter wrote:
On Mon, Nov 07, 2005 at 05:12:05PM +0900, Michael Glaesmann wrote:
I'm trying to concatenate strings in variable orders using a custom
aggregate. However, I'm having a difficult time figuring out the
SQL I need to use to accomplish this.
How ab
Michael Glaesemann <[EMAIL PROTECTED]> writes:
> On Nov 7, 2005, at 23:24 , Tom Lane wrote:
>> Strictly speaking, you need this:
>> select bar_id, array_accum(foo_value) from
>> (select * from ordered_foo order by bar_id, foo_pos) as ss
>> group by bar_id order by bar_id;
>> ie, sort
On Nov 7, 2005, at 23:24 , Tom Lane wrote:
Strictly speaking, you need this:
select bar_id, array_accum(foo_value) from
(select * from ordered_foo order by bar_id, foo_pos) as ss
group by bar_id order by bar_id;
ie, sort the subselect by the grouping key of the outer q
Joe Conway <[EMAIL PROTECTED]> writes:
> Michael Glaesemann wrote:
>> I'm trying to concatenate strings in variable orders using a custom
>> aggregate.
> Just use a subselect -- you're looking for this, correct?
> regression=# select bar_id, array_accum(foo_value) from (select * from
> ordere
On Monday, November 07, 2005 12:12 AM
Michael Glaesemann wrote:
>
> select bar_id, array_accum(foo_value)
> from ordered_foo
> group by bar_id
> order by bar_id;
> bar_id | array_accum
> +-
>1 | {delta,alpha,charlie,bravo}
>2 | {C,B,A,D}
On Nov 7, 2005, at 17:40 , Roger Hand wrote:
On Monday, November 07, 2005 12:12 AM
Michael Glaesemann wrote:
select bar_id, array_accum(foo_value)
from ordered_foo
group by bar_id
order by bar_id;
bar_id | array_accum
+-
1 | {delta,alpha,char
Michael Glaesemann wrote:
I'm trying to concatenate strings in variable orders using a custom
aggregate. However, I'm having a difficult time figuring out the SQL I
need to use to accomplish this. Here's a test case that shows the error
I'm getting.
select bar_id, array_accum(foo_value)
f
On Mon, Nov 07, 2005 at 05:12:05PM +0900, Michael Glaesmann wrote:
> I'm trying to concatenate strings in variable orders using a custom
> aggregate. However, I'm having a difficult time figuring out the
> SQL I need to use to accomplish this.
How about using the ARRAY() constructor as below?
>
I'm trying to concatenate strings in variable orders using a custom
aggregate. However, I'm having a difficult time figuring out the SQL
I need to use to accomplish this. Here's a test case that shows the
error I'm getting.
select version();