sum the text of a text field

From: Sim Zacks <sim(at)compulab(dot)co(dot)il>
To: pgsql-general(at)postgresql(dot)org
Subject: sum the text of a text field
Date: 2008-10-29 11:20:59
Message-ID: ge9guq$2u6f$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Is there any way (aside from creating a new aggregate type) to sum the
text in a text field. I would like to group on a query and concatenate
all the values of a specific field in the result set.

This is a common practice and currently I find myself writing functions
to iterate the data to basically build my own text sum function.

I'm going to look into building my own aggregate type, but if there is
something out there that works it will make life simpler.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkIRxsACgkQjDX6szCBa+pClACgi1gV9FsE4Hj5bdOueHENwq2l
lo0An09lAf160qz/nYMnb0LLCF6VU7Qs
=pkwu
-----END PGP SIGNATURE-----

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Abdul Rahman 2008-10-29 11:21:12 Re: Replication with slony-I
Previous Message Abdul Rahman 2008-10-29 11:10:15 Re: Replication with slony-I