I have a lot of character varying records in this format: {'address': 'New Mexico'}
.
I would like to update all those columns to have it like this: New Mexico
.
I've been investigating how to do it, and it could be with regexp, but I don't know how to make for all columns in a table, and I never used regex in PostgreSQL before.
I have an idea that is something like this:
SET location = regexp_replace(field, 'match pattern', 'replace string', 'g')