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

Popular posts from this blog

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -