summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/postgre/postgre_driver.php
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2009-02-27 17:29:59 +0100
committerDerek Jones <derek.jones@ellislab.com>2009-02-27 17:29:59 +0100
commit87cbafce2d6803af78714baf8bba64309c01fc33 (patch)
treeebc4797260b74b4959ac07cabaa97ba4236c3e2f /system/database/drivers/postgre/postgre_driver.php
parentaf4fb22745413cac182064a495da83318a41fde9 (diff)
added reconnect() method to db drivers
Diffstat (limited to 'system/database/drivers/postgre/postgre_driver.php')
-rw-r--r--system/database/drivers/postgre/postgre_driver.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php
index 4bc5b7d94..db3a3f29d 100644
--- a/system/database/drivers/postgre/postgre_driver.php
+++ b/system/database/drivers/postgre/postgre_driver.php
@@ -102,6 +102,25 @@ class CI_DB_postgre_driver extends CI_DB {
// --------------------------------------------------------------------
/**
+ * Reconnect
+ *
+ * Keep / reestablish the db connection if no queries have been
+ * sent for a length of time exceeding the server's idle timeout
+ *
+ * @access public
+ * @return void
+ */
+ function reconnect()
+ {
+ if (pg_ping($this->conn_id) === FALSE)
+ {
+ $this->conn_id = FALSE;
+ }
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
* Select the database
*
* @access private called by the base class