summaryrefslogtreecommitdiffstats
path: root/system/database
diff options
context:
space:
mode:
authordchill42 <dchill42@gmail.com>2012-08-27 17:57:31 +0200
committerdchill42 <dchill42@gmail.com>2012-08-27 17:57:31 +0200
commit62ece3359211482dc5671b9521454608ad226840 (patch)
treed80aac29baaad6e9b51e865dc3ab7367c40077d4 /system/database
parentaee9265602c3bb30a1f7f3dfd562b9b36cc612a4 (diff)
parent2d5c209943ef1e2644504e8d5cb32d3d66b45632 (diff)
Merge branch 'develop' of git://github.com/EllisLab/CodeIgniter into session
Diffstat (limited to 'system/database')
-rw-r--r--system/database/drivers/postgre/postgre_driver.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php
index 031740851..8c11c477b 100644
--- a/system/database/drivers/postgre/postgre_driver.php
+++ b/system/database/drivers/postgre/postgre_driver.php
@@ -132,7 +132,15 @@ class CI_DB_postgre_driver extends CI_DB {
*/
public function db_pconnect()
{
- return @pg_pconnect($this->dsn);
+ $conn = @pg_pconnect($this->dsn);
+ if ($conn && pg_connection_status($conn) === PGSQL_CONNECTION_BAD)
+ {
+ if (pg_ping($conn) === FALSE)
+ {
+ return FALSE;
+ }
+ }
+ return $conn;
}
// --------------------------------------------------------------------