Re: insert into table from list or array ? - Mailing list pgsql-sql

From Andreas
Subject Re: insert into table from list or array ?
Date
Msg-id 4CBCD29E.3000304@gmx.net
Whole thread Raw
In response to Re: insert into table from list or array ?  (Pavel Stehule <pavel.stehule@gmail.com>)
List 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.   :)


pgsql-sql by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: insert into table from list or array ?
Next
From: Nicholas I
Date:
Subject: Need help on update.