From a087f98c92d6399fcaf58e2423117f742381a7a6 Mon Sep 17 00:00:00 2001 From: Chris Sharp Date: Wed, 7 Dec 2011 16:00:28 -0500 Subject: [PATCH] adding lines to deal with "wide character" issue --- Open-ILS/src/sql/Pg/pines-pre-1.6.1-2.1-upgrade.sql | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/sql/Pg/pines-pre-1.6.1-2.1-upgrade.sql b/Open-ILS/src/sql/Pg/pines-pre-1.6.1-2.1-upgrade.sql index 8cf1fb3de4..e8f3adf882 100644 --- a/Open-ILS/src/sql/Pg/pines-pre-1.6.1-2.1-upgrade.sql +++ b/Open-ILS/src/sql/Pg/pines-pre-1.6.1-2.1-upgrade.sql @@ -190,12 +190,25 @@ COMMIT; -- we need to tell Evergreen that every record we have in the system is a Unicode record: --- disable triggers on biblio.record_entry: +-- disable triggers on biblio.record_entry and authority.record_entry: +ALTER TABLE biblio.record_entry DISABLE TRIGGER ALL; +ALTER TABLE authority.record_entry DISABLE TRIGGER ALL; +BEGIN; UPDATE biblio.record_entry SET marc = regexp_replace(marc, E'(.{9}).', E'\\1a'); +UPDATE authority.record_entry + SET marc = regexp_replace(marc, E'(.{9}).', E'\\1a'); +COMMIT; + +-- re-enable triggers +ALTER TABLE biblio.record_entry ENABLE TRIGGER ALL; +ALTER TABLE authority.record_entry ENABLE TRIGGER ALL; +-- except for one for each table that was disabled before we started +ALTER TABLE biblio.record_entry DISABLE TRIGGER _replication_denyaccess; +ALTER TABLE authority.record_entry DISABLE TRIGGER _replication_denyaccess; -- These are restored by the post-upgrade PINES sql script. -- 2.11.0