Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UHfZf-0008QH-0n for pgsql-sql@arkaria.postgresql.org; Mon, 18 Mar 2013 19:18:23 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UHfZe-0000Zw-HB for pgsql-sql@arkaria.postgresql.org; Mon, 18 Mar 2013 19:18:22 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UHfZd-0000Zq-LA for pgsql-sql@postgresql.org; Mon, 18 Mar 2013 19:18:21 +0000 Received: from mout.gmx.net ([212.227.15.19]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UHfZZ-0003zm-VL for pgsql-sql@postgresql.org; Mon, 18 Mar 2013 19:18:21 +0000 Received: from mailout-de.gmx.net ([10.1.76.34]) by mrigmx.server.lan (mrigmx002) with ESMTP (Nemesis) id 0LvOyj-1UhHSd3CiZ-010biv for ; Mon, 18 Mar 2013 20:18:17 +0100 Received: (qmail invoked by alias); 18 Mar 2013 19:13:10 -0000 Received: from mue-88-130-52-197.dsl.tropolys.de (EHLO [192.168.1.113]) [88.130.52.197] by mail.gmx.net (mp034) with SMTP; 18 Mar 2013 20:13:10 +0100 X-Authenticated: #14269776 X-Provags-ID: V01U2FsdGVkX1+FRyIwXZSF+wcTVVEl0xjOyDeo+DlNuaAB0PjYh2 /moL5TBrr49k1z Message-ID: <51476751.1040902@gmx.net> Date: Mon, 18 Mar 2013 20:13:21 +0100 From: Andreas User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: How to split an array-column? Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Pg-Spam-Score: -4.4 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org Hi, I've got a table to import from csv that has an array-column like: import ( id, array_col, ... ) Those arrays look like ( 42, ";4941;4931;4932", ... ) They can have 0 or any number of elements separated by ; So I'd need a result like this: 42, 4941 42, 4931 42, 4932 How would I get this? -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql