From 8b06cec412897d577703953ce42f64c15d8cf61b Mon Sep 17 00:00:00 2001 From: Chris Sharp Date: Sat, 16 Feb 2013 09:41:00 -0500 Subject: [PATCH] explicitly adding search path; altering the regexp_replace function to catch *all* non-unicode-marked records --- Open-ILS/src/sql/Pg/version-upgrade/pines-pre-2.1-2.2-upgrade.sql | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/sql/Pg/version-upgrade/pines-pre-2.1-2.2-upgrade.sql b/Open-ILS/src/sql/Pg/version-upgrade/pines-pre-2.1-2.2-upgrade.sql index 472cb4b611..5cb41481d8 100644 --- a/Open-ILS/src/sql/Pg/version-upgrade/pines-pre-2.1-2.2-upgrade.sql +++ b/Open-ILS/src/sql/Pg/version-upgrade/pines-pre-2.1-2.2-upgrade.sql @@ -3,6 +3,10 @@ -- remove replication schema DROP SCHEMA _replication CASCADE; + +-- this should already be true, but explicitly setting the search path to include the evergreen schema: +SELECT evergreen.change_db_setting('search_path', ARRAY['evergreen','public','pg_catalog']); + -- For preventing invalid marcxml - possible supplement or replacement for biblio.check_marcxml_well_formed? -- Should be useful for flagging bad MARCXML that has slipped in over time @@ -43,7 +47,7 @@ CREATE INDEX aud_serial_unit_hist_editor_idx ON auditor.serial_unit_history ALTER TABLE biblio.record_entry DISABLE TRIGGER ALL; UPDATE biblio.record_entry - SET marc = regexp_replace(marc, E'(.{9}).', E'\\1a'); + SET marc = regexp_replace(marc, E'(]*>.{9}).', E'\\1a'); ALTER TABLE biblio.record_entry ENABLE TRIGGER ALL; -- 2.11.0