[open-ils-commits] r18680 - branches/rel_1_6_1/Open-ILS/src/sql/Pg (gmc)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Nov 10 08:30:40 EST 2010


Author: gmc
Date: 2010-11-10 08:30:39 -0500 (Wed, 10 Nov 2010)
New Revision: 18680

Modified:
   branches/rel_1_6_1/Open-ILS/src/sql/Pg/reporter-schema.sql
Log:
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 <gmc at esilibrary.com>


Modified: branches/rel_1_6_1/Open-ILS/src/sql/Pg/reporter-schema.sql
===================================================================
--- branches/rel_1_6_1/Open-ILS/src/sql/Pg/reporter-schema.sql	2010-11-10 13:21:25 UTC (rev 18679)
+++ branches/rel_1_6_1/Open-ILS/src/sql/Pg/reporter-schema.sql	2010-11-10 13:30:39 UTC (rev 18680)
@@ -256,7 +256,7 @@
 
 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)



More information about the open-ils-commits mailing list