[open-ils-commits] r9955 - trunk/Open-ILS/src/sql/Pg
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Jul 1 22:19:26 EDT 2008
Author: miker
Date: 2008-07-01 22:19:25 -0400 (Tue, 01 Jul 2008)
New Revision: 9955
Modified:
trunk/Open-ILS/src/sql/Pg/1.2.2.1-1.2.2.2-upgrade-db.sql
Log:
update the currently indexed data to handle birth/death date stemming consistently
Modified: trunk/Open-ILS/src/sql/Pg/1.2.2.1-1.2.2.2-upgrade-db.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/1.2.2.1-1.2.2.2-upgrade-db.sql 2008-07-02 01:42:00 UTC (rev 9954)
+++ trunk/Open-ILS/src/sql/Pg/1.2.2.1-1.2.2.2-upgrade-db.sql 2008-07-02 02:19:25 UTC (rev 9955)
@@ -30,5 +30,29 @@
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;
More information about the open-ils-commits
mailing list