From: Chris Sharp Date: Sat, 16 Feb 2013 14:41:00 +0000 (-0500) Subject: explicitly adding search path; altering the regexp_replace function to catch *all... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=6ed949829e9f2856ff6c2d95922136a18c8b921f;p=evergreen%2Fpines.git explicitly adding search path; altering the regexp_replace function to catch *all* non-unicode-marked records --- 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;