Bug fix, incorrect variable name
authorLuiz K. Matsumura <luiz.matsumura@gmail.com>
Thu, 8 Nov 2012 23:48:22 +0000 (21:48 -0200)
committerLuiz K. Matsumura <luiz.matsumura@gmail.com>
Thu, 8 Nov 2012 23:48:22 +0000 (21:48 -0200)
temporary pgpass file without password because of this bug

tools/altperl/slon-tools.pm

index cde1663a4fbb712018b7c6d6d73c43c0040ce3e5..196d5805d71417e81a9cb5b55128e2c5f7dc57a3 100644 (file)
@@ -246,7 +246,7 @@ limit 1)
   if ($passwd) {
      my ($fh, $filename) = tempfile();
      chmod( 0600, $filename);
-     print $fh "$host:$port:$dbname:$dbuser:$password";
+     print $fh "$host:$port:$dbname:$dbuser:$passwd";
      close $fh;
      $result=`PGPASSFILE=$filename @@PGBINDIR@@/psql -p $port -h $host -U $dbuser -c "$query" --tuples-only $dbname`;
      unlink $filename;
@@ -337,7 +337,7 @@ limit 1;   --- One such entry is sufficient...
   if ($passwd) {
      my ($fh, $filename) = tempfile();
      chmod(0600,$filename);
-     print $fh "$host:$port:$dbname:$dbuser:$password";
+     print $fh "$host:$port:$dbname:$dbuser:$passwd";
      close $fh;
      $result=`PGPASSFILE=$filename @@PGBINDIR@@/psql -p $port -h $host -U $dbuser -c "$query" --tuples-only $dbname`;
      unlink $filename;