Data mangling

16/09/16

Permalink 09:54:59 am, by Greg, 69 words, 84 views   English (CA)
Categories: Activity log; Mins. worked: 60

Data mangling

When I imported the data I seem to have run strings through an escape routine twice, producing results like Jack O''Connor (note the double single quote. Replacing them was a bit of a hassle, but the logic is pretty simple:
UPDATE person SET surname = regexp_replace(surname, '''''', '''', 'g') WHERE surname like '%''''%';

I then had to refresh the materialized view:
REFRESH MATERIALIZED VIEW person_mv;

Pingbacks:

No Pingbacks for this post yet...

CGWP

Development blog for next version of the Canadian Great War Project. The production site is at https://cgwp.uvic.ca/, and the development site is at https://cgwpdev.uvic.ca/ (access controlled)

Some sections of the development site are not explicitly linked via menus. See the post titled "CGWP development URLs" for details.

Reports

XML Feeds