How do you do the opposite of regexp_split_to_table?

From: John Gage <jsmgage(at)numericable(dot)fr>
To: pgsql-sql(at)postgresql(dot)org
Subject: How do you do the opposite of regexp_split_to_table?
Date: 2010-08-03 20:21:58
Message-ID: 4FA8D090-F145-485B-9062-7136CB8B6CB0@numericable.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I would like to take several rows from a select and have them grouped
into one row with the text contents of one field in all the rows
concatenated into one field in the single row of the group group. The
contents of the other fields are identical across the rows.

This is the complementary action to regexp_split_to_table.

Grouping by summing numerical fields seems to be straightforward, but
grouping by concatenating text fields escapes my search of the
documentation.

Thanking you for your patience,

John

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Alvaro Herrera 2010-08-03 20:35:26 Re: How do you do the opposite of regexp_split_to_table?
Previous Message Tom Lane 2010-08-03 15:54:28 Re: Backslash characters in PLPGSQL