postgresql - Populate column with content from another column -
i have table in postgres 1 field (group_id) missing older records. however, field consist of urls , 1 part of url group_id. following substring extracts group_id
"substring"(my_table.url, '.*app/([^/]*)'::text) how replace missing records these?
begin; update my_table set group_id = "substring"(my_table.url, '.*app/([^/]*)'::text); commit;
Comments
Post a Comment