From: gmc Date: Wed, 10 Nov 2010 13:31:09 +0000 (+0000) Subject: do not use TRUNCATE when refreshing reporter.materialized_simple_record X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=3d6209fe76cc1bb633512a62165f9938c4debb13;p=Evergreen.git do not use TRUNCATE when refreshing reporter.materialized_simple_record Previous behavior would break Slony replication after doing a bib load. Since a deletion is slower than a truncate, if you're not using Slony replication, you may prefer to truncate rmsr prior to calling reporter.enable_materialized_simple_record_trigger. Signed-off-by: Galen Charlton git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_6_0@18681 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/sql/Pg/reporter-schema.sql b/Open-ILS/src/sql/Pg/reporter-schema.sql index 3e429ae2e0..e61b476ee8 100644 --- a/Open-ILS/src/sql/Pg/reporter-schema.sql +++ b/Open-ILS/src/sql/Pg/reporter-schema.sql @@ -256,7 +256,7 @@ $$ LANGUAGE plpgsql; CREATE OR REPLACE FUNCTION reporter.enable_materialized_simple_record_trigger () RETURNS VOID AS $$ - TRUNCATE TABLE reporter.materialized_simple_record; + DELETE FROM reporter.materialized_simple_record; INSERT INTO reporter.materialized_simple_record (id,fingerprint,quality,tcn_source,tcn_value,title,author,publisher,pubdate,isbn,issn)