update the currently indexed data to handle birth/death date stemming consistently
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 2 Jul 2008 02:19:25 +0000 (02:19 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 2 Jul 2008 02:19:25 +0000 (02:19 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@9955 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/sql/Pg/1.2.2.1-1.2.2.2-upgrade-db.sql

index eb47a00..fc410a8 100644 (file)
@@ -30,5 +30,29 @@ CREATE VIEW extend_reporter.full_circ_count AS
    LEFT JOIN "action".circulation circ ON circ.target_copy = c.id
   GROUP BY cp.id;
 
    LEFT JOIN "action".circulation circ ON circ.target_copy = c.id
   GROUP BY cp.id;
 
+UPDATE  metabib.title_field_entry
+  SET   value = REGEXP_REPLACE(value, E'(\\d{4})-(\\d{4})', E'\\1 \\2','g')
+  WHERE value ~ E'(\\d{4})-(\\d{4})';
+
+UPDATE  metabib.author_field_entry
+  SET   value = REGEXP_REPLACE(value, E'(\\d{4})-(\\d{4})', E'\\1 \\2','g')
+  WHERE value ~ E'(\\d{4})-(\\d{4})';
+
+UPDATE  metabib.keyword_field_entry
+  SET   value = REGEXP_REPLACE(value, E'(\\d{4})-(\\d{4})', E'\\1 \\2','g')
+  WHERE value ~ E'(\\d{4})-(\\d{4})';
+
+UPDATE  metabib.subject_field_entry
+  SET   value = REGEXP_REPLACE(value, E'(\\d{4})-(\\d{4})', E'\\1 \\2','g')
+  WHERE value ~ E'(\\d{4})-(\\d{4})';
+
+UPDATE  metabib.series_field_entry
+  SET   value = REGEXP_REPLACE(value, E'(\\d{4})-(\\d{4})', E'\\1 \\2','g')
+  WHERE value ~ E'(\\d{4})-(\\d{4})';
+
+UPDATE  metabib.full_rec
+  SET   value = REGEXP_REPLACE(value, E'(\\d{4})-(\\d{4})', E'\\1 \\2','g')
+  WHERE value ~ E'(\\d{4})-(\\d{4})';
+
 COMMIT;
 
 COMMIT;