mirroring changs to pg_loader
authorsboyette <sboyette@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 14 Jan 2009 23:56:57 +0000 (23:56 +0000)
committersboyette <sboyette@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 14 Jan 2009 23:56:57 +0000 (23:56 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@11835 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/extras/import/parallel_pg_loader.pl

index b611774..1cabb7a 100755 (executable)
@@ -17,6 +17,7 @@ use Getopt::Long;
 my @files;
 my ($config, $output, @auto, @order, @wipe) =
        ('/openils/conf/opensrf_core.xml', 'pg_loader-output');
+my $nocommit = 0;
 
 GetOptions(
        'config=s'      => \$config,
@@ -24,6 +25,7 @@ GetOptions(
        'wipe=s'        => \@wipe,
        'autoprimary=s' => \@auto,
        'order=s'       => \@order,
+       'nocommit=i'    => \$nocommit,
 );
 
 my $pwd = `pwd`;
@@ -124,5 +126,5 @@ while ( my $rec = <> ) {
 if (grep /^mfr$/, %out_files) {
        $main_out->print("SELECT reporter.enable_materialized_simple_record_trigger();\n");
 }
-$main_out->print("COMMIT;\n\n");
+$main_out->print("COMMIT;\n\n") unless $nocommit;
 $main_out->close;