From: Andreas <maps.on@gmx.net>
To: pgsql-sql@postgresql.org
Subject: How to split an array-column?
Date: Mon, 18 Mar 2013 20:13:21 +0100
Message-ID: <51476751.1040902@gmx.net> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-sql>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: maps.on@gmx.net
Subject: Re: How to split an array-column?
In-Reply-To: <51476751.1040902@gmx.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox