summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/pdo/subdrivers
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-01-30 12:50:00 +0100
committerAndrey Andreev <narf@devilix.net>2014-01-30 12:50:00 +0100
commit279256fabd55b3fac705be8097ee22d54ceaab50 (patch)
tree3a05a572df5757e24cfe29f3a32c7885ff7c7b41 /system/database/drivers/pdo/subdrivers
parent1a903921473d1bedda86e758dc171233f9f69492 (diff)
Some fail-safe pdo_pgsql adjustments
Diffstat (limited to 'system/database/drivers/pdo/subdrivers')
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php b/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php
index 6ee327bd5..24f64cff5 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_pgsql_driver.php
@@ -84,6 +84,12 @@ class CI_DB_pdo_pgsql_driver extends CI_DB_pdo_driver {
empty($this->port) OR $this->dsn .= ';port='.$this->port;
empty($this->database) OR $this->dsn .= ';dbname='.$this->database;
+
+ if ( ! empty($this->username))
+ {
+ $this->dsn .= ';username=$this->username;
+ empty($this->password) OR $this->dsn .= ';password='.$this->password;
+ }
}
}