La chaîne location ressemble beaucoup à un tableau texte : convertissez-la en text[] puis faites un unnest :
with my_data(id, location) as ( values (1, '["Humboldt, TN","Medina, TN","Milan, TN"]') ) select id, unnest(format('{%s}', trim(location, '[]'))::text[]) as location from my_data id | location ----+-------------- 1 | Humboldt, TN 1 | Medina, TN 1 | Milan, TN (3 rows)
Ou, plus simplement encore, convertissez en jsonb et utilisez jsonb_array_elements_text() :
with my_data(id, location) as ( values (1, '["Humboldt, TN","Medina, TN","Milan, TN"]') ) select id, jsonb_array_elements_text(location::jsonb) as location from my_data
La voie JSONB est plus propre, car elle respecte les virgules intégrées à chaque valeur entre guillemets, sur lesquelles un découpage naïf de tableau peut achopper.