Re: insert into table from list or array ?

From: Andreas <maps(dot)on(at)gmx(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: insert into table from list or array ?
Date: 2010-10-18 23:05:02
Message-ID: 4CBCD29E.3000304@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Am 18.10.2010 20:14, schrieb Pavel Stehule:
> 2010/10/18 Andreas:
>> is it possible to insert into a table from list or an array ?
> yes, it's possible
>
> INSERT INTO tmptab
> SELECT v
> FROM unnest(string_to_array('1,2,4,2,1',',')) g(v)
>

Thanks Pavel,
though I'm just not yet 100% aware how it works but it works. :)

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Nicholas I 2010-10-21 07:43:42 Need help on update.
Previous Message Pavel Stehule 2010-10-18 18:14:28 Re: insert into table from list or array ?