[open-ils-commits] r14051 - tags/rel_1_6_0_0/Open-ILS/src/extras/import (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Sep 18 13:26:27 EDT 2009
Author: miker
Date: 2009-09-18 13:26:23 -0400 (Fri, 18 Sep 2009)
New Revision: 14051
Modified:
tags/rel_1_6_0_0/Open-ILS/src/extras/import/parallel_pg_loader.pl
tags/rel_1_6_0_0/Open-ILS/src/extras/import/pg_loader.pl
Log:
Bug reported by Wiktor Rzeczkowski from McMaster University: [parallel_]pg_loader.pl was not taught about the changes to the materialized_simple_record trigger
Modified: tags/rel_1_6_0_0/Open-ILS/src/extras/import/parallel_pg_loader.pl
===================================================================
--- tags/rel_1_6_0_0/Open-ILS/src/extras/import/parallel_pg_loader.pl 2009-09-18 17:25:53 UTC (rev 14050)
+++ tags/rel_1_6_0_0/Open-ILS/src/extras/import/parallel_pg_loader.pl 2009-09-18 17:26:23 UTC (rev 14051)
@@ -88,9 +88,6 @@
my $fields = join(',', @{ $fieldcache{$hint}{fields} });
$main_out->print( "DELETE FROM $fieldcache{$hint}{table};\n" ) if (grep {$_ eq $hint } @wipe);
# Speed up loading of bib records
- if ($hint eq 'mfr') {
- $main_out->print("\nSELECT reporter.disable_materialized_simple_record_trigger();\n");
- }
$main_out->print( "COPY $fieldcache{$hint}{table} ($fields) FROM '$pwd/$output.$hint.sql';\n" );
}
@@ -131,6 +128,7 @@
if (grep /^mfr$/, %out_files) {
$main_out->print("SELECT reporter.enable_materialized_simple_record_trigger();\n");
+ $main_out->print("SELECT reporter.disable_materialized_simple_record_trigger();\n");
}
$main_out->print("COMMIT;\n\n") unless $nocommit;
Modified: tags/rel_1_6_0_0/Open-ILS/src/extras/import/pg_loader.pl
===================================================================
--- tags/rel_1_6_0_0/Open-ILS/src/extras/import/pg_loader.pl 2009-09-18 17:25:53 UTC (rev 14050)
+++ tags/rel_1_6_0_0/Open-ILS/src/extras/import/pg_loader.pl 2009-09-18 17:26:23 UTC (rev 14051)
@@ -94,9 +94,6 @@
my $fields = join(',', @{ $fieldcache{$h}{fields} });
$output->print( "DELETE FROM $fieldcache{$h}{table};\n" ) if (grep {$_ eq $h } @wipe);
# Speed up loading of bib records
- if ($h eq 'mfr') {
- $output->print("\nSELECT reporter.disable_materialized_simple_record_trigger();\n");
- }
$output->print( "COPY $fieldcache{$h}{table} ($fields) FROM STDIN;\n" );
for my $line (@{ $lineset{$h} }) {
@@ -125,6 +122,7 @@
if ($h eq 'mfr') {
$output->print("SELECT reporter.enable_materialized_simple_record_trigger();\n");
+ $output->print("SELECT reporter.disable_materialized_simple_record_trigger();\n");
}
$output->print("SELECT setval('$fieldcache{$h}{sequence}'::TEXT, (SELECT MAX($fieldcache{$h}{pkey}) FROM $fieldcache{$h}{table}), TRUE);\n\n")
More information about the open-ils-commits
mailing list