Best way to inplace alter a list going into postgres

Sayth Renshaw flebber.crue at gmail.com
Tue May 31 04:46:13 EDT 2016


Probably easier to handle in postgres http://stackoverflow.com/a/37538641/461887

select c1[1] as col1, 
       c1[2] as col2, 
       c1[3] as col3,
       c1[4] as col4,
       substr(col5, 2) as col5
from (
   select string_to_array((string_to_array(the_column, ' '))[1], '-') as c1,
          (string_to_array(the_column, ' '))[2] as col5
   from the_table
) t



More information about the Python-list mailing list