Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 9B6686321CA for ; Tue, 3 Aug 2010 17:22:11 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 75655-02 for ; Tue, 3 Aug 2010 20:22:04 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp2.tech.numericable.fr (smtp2.tech.numericable.fr [82.216.111.38]) by mail.postgresql.org (Postfix) with ESMTP id 53A69633274 for ; Tue, 3 Aug 2010 17:22:03 -0300 (ADT) Received: from [10.0.1.2] (abo-102-217-68.trs.modulonet.fr [85.68.217.102]) by smtp2.tech.numericable.fr (Postfix) with ESMTP id 532E118D816 for ; Tue, 3 Aug 2010 22:21:59 +0200 (CEST) Message-Id: <4FA8D090-F145-485B-9062-7136CB8B6CB0@numericable.fr> From: John Gage To: pgsql-sql@postgresql.org Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Subject: How do you do the opposite of regexp_split_to_table? Date: Tue, 3 Aug 2010 22:21:58 +0200 X-Mailer: Apple Mail (2.936) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.79 tagged_above=-5 required=5 tests=BAYES_50=0.8, RCVD_IN_DNSWL_NONE=-0.0001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201008/5 X-Sequence-Number: 34445 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