summaryrefslogtreecommitdiffstats
path: root/system/drivers/DB_postgre.php
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-09-02 19:34:52 +0200
committeradmin <devnull@localhost>2006-09-02 19:34:52 +0200
commit2ed76d5ac89ec7869dcb64c050360fb2f99e9326 (patch)
treed9a8a11e7b94bb51088aaa06e128f99a1c5adc60 /system/drivers/DB_postgre.php
parent51cf423e1e41f573f87176d28affa50efda46c45 (diff)
Diffstat (limited to 'system/drivers/DB_postgre.php')
-rw-r--r--system/drivers/DB_postgre.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/system/drivers/DB_postgre.php b/system/drivers/DB_postgre.php
index fd98ec78b..673dea335 100644
--- a/system/drivers/DB_postgre.php
+++ b/system/drivers/DB_postgre.php
@@ -38,9 +38,11 @@ class CI_DB_postgre extends CI_DB {
*/
function db_connect()
{
- return pg_connect("host=".$this->hostname." dbname=".$this->database." user=".$this->username." password=".$this->password);
+ $port = ($this->port == '') ? '' : " port=".$this->port;
+
+ return pg_connect("host=".$this->hostname.$port." dbname=".$this->database." user=".$this->username." password=".$this->password);
}
-
+
// --------------------------------------------------------------------
/**
@@ -51,7 +53,9 @@ class CI_DB_postgre extends CI_DB {
*/
function db_pconnect()
{
- return pg_pconnect("host=".$this->hostname." dbname=".$this->database." user=".$this->username." password=".$this->password);
+ $port = ($this->port == '') ? '' : " port=".$this->port;
+
+ return pg_pconnect("host=".$this->hostname.$port." dbname=".$this->database." user=".$this->username." password=".$this->password);
}
// --------------------------------------------------------------------