Re: concatenate text - Mailing list pgsql-general

From Tino Wildenhain
Subject Re: concatenate text
Date
Msg-id 1125900351.6682.34.camel@Andrea.peacock.de
Whole thread Raw
In response to concatenate text  (Sterpu Victor <victor@ambra.ro>)
List pgsql-general
Am Montag, den 05.09.2005, 03:00 +0300 schrieb Sterpu Victor:
> Can I do something like this?
> SELECT sum(name) FROM table;
>
> Where name is a text field.
> I know 'sum' doesn't work, but is there another solution?
> '||' is not good because it will take just 2 arguments.
>

Yes you can write an aggregate using built in textcat()
function or via array_append() if you are bulding an
array first and translate it into a string on output
of your aggregate. (This should be faster, I personally
used the version with textcat)

Regards
Tino


pgsql-general by date:

Previous
From: Allan Wang
Date:
Subject: Re: concatenate text
Next
From: Berend Tober
Date:
Subject: Re: concatenate text