Search Postgresql Archives

Re: concatenate text

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
       message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux