--- pgdiff 2003/08/13 13:27:32 1.6 +++ pgdiff 2003/08/15 22:06:19 1.7 @@ -63,8 +63,20 @@ print "Master connection is $minfo\n" if ($debug); print "Slave connection is $sinfo\n" if ($debug); -my $mdbh = DBI->connect("DBI:Pg:$minfo", $masteruser, $masterpassword, { PrintError => 1 }); -my $sdbh = DBI->connect("DBI:Pg:$sinfo", $slaveuser, $slavepassword, { PrintError => 1 }); +my $mdbh = DBI->connect("DBI:Pg:$minfo", $masteruser, $masterpassword, { PrintError => 0 } ); +if (! $mdbh) { + print "Can't connect to master database $master"; + print "on $masterhost" if ($masterhost); + print "\n"; + exit 1; +} +my $sdbh = DBI->connect("DBI:Pg:$sinfo", $slaveuser, $slavepassword, { PrintError => 0 }); +if (! $sdbh) { + print "Can't connect to slave database $slave"; + print "on $slavehost" if ($slavehost); + print "\n"; + exit 1; +} my ($diff_shema,$diff_data) = (0,0);