From: gmc Date: Wed, 10 Nov 2010 13:21:25 +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=376a1906fc277d7371e627fbedc87a2fc4609aa9;p=working%2FEvergreen.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@18679 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 f70f4603eb..5e57d76770 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)