backporting r13983: turn off array expansion in DBD::Pg (new feature that is on by...
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 24 Sep 2009 17:05:39 +0000 (17:05 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 24 Sep 2009 17:05:39 +0000 (17:05 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_6_0@14150 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/reporter/clark-kent.pl

index 8e686fb..5e87cb2 100755 (executable)
@@ -102,7 +102,16 @@ if ($daemon) {
 
 DAEMON:
 
-$dbh = DBI->connect($state_dsn,$state_db{db_user},$state_db{db_pw}, {AutoCommit => 1, pg_enable_utf8 => 1, RaiseError => 1});
+$dbh = DBI->connect(
+       $state_dsn,
+       $state_db{db_user},
+       $state_db{db_pw},
+       { AutoCommit => 1,
+         pg_expand_array => 0,
+         pg_enable_utf8 => 1,
+         RaiseError => 1
+       }
+);
 
 $current_time = DateTime->from_epoch( epoch => time() )->strftime('%FT%T%z');
 
@@ -175,8 +184,27 @@ for my $r ( @reports ) {
        # This is the child (runner) process;
        daemonize("Clark Kent reporting: $r->{report}->{name}");
 
-       my $state_dbh = DBI->connect($state_dsn,$state_db{db_user},$state_db{db_pw}, {AutoCommit => 1, pg_enable_utf8 => 1, RaiseError => 1});
-       my $data_dbh = DBI->connect($data_dsn,$data_db{db_user},$data_db{db_pw}, {AutoCommit => 1, pg_enable_utf8 => 1, RaiseError => 1});
+       my $state_dbh = DBI->connect(
+               $state_dsn,
+               $state_db{db_user},
+               $state_db{db_pw},
+               { AutoCommit => 1,
+                 pg_expand_array => 0,
+                 pg_enable_utf8 => 1,
+                 RaiseError => 1
+               }
+       );
+
+       my $data_dbh = DBI->connect(
+               $data_dsn,
+               $data_db{db_user},
+               $data_db{db_pw},
+               { AutoCommit => 1,
+                 pg_expand_array => 0,
+                 pg_enable_utf8 => 1,
+                 RaiseError => 1
+               }
+       );
 
        try {
                $state_dbh->do(<<'              SQL',{}, $r->{id});