Password is not obligatory
authorHubert depesz Lubaczewski <depesz@depesz.com>
Sun, 24 Jun 2012 12:54:27 +0000 (14:54 +0200)
committerHubert depesz Lubaczewski <depesz@depesz.com>
Sun, 24 Jun 2012 12:54:27 +0000 (14:54 +0200)
We can connect using password stored in ~/.pgpass, or with password from
PGPASSWORD, or PostgreSQL can be configured to use "trust" or
"peer/ident" authentication schemata. In all these cases password
configuration in config file is not necessary.

db.pm

diff --git a/db.pm b/db.pm
index 2013cdec7c9b9aa92a740562db282bfafa2c6627..bdae21b80637079059646edaa6bf136d39672632 100644 (file)
--- a/db.pm
+++ b/db.pm
@@ -87,9 +87,6 @@ sub verify_config {
     if (!defined($self->{config}->{'username'})) {
         return 0;
     }
-    if (!defined($self->{config}->{'password'})) {
-        return 0;
-    }
     if (!defined($self->{config}->{'schema'})) {
         return 0;
     }