diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-10-12 10:56:34 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-10-12 10:56:34 +0200 |
commit | bffe3fb935c8a28e1ccacf56f678a491edcff043 (patch) | |
tree | 5a39ba6907623d5ad46b7d13ef17e360df1dfe5e /system/database/drivers/postgre | |
parent | 55b82c95be57a6727d45d6ae9652ff612f96bc37 (diff) | |
parent | 9ae82faaad2f6b07a050d79129652b74483d1da0 (diff) |
Merge changes from develop
Diffstat (limited to 'system/database/drivers/postgre')
-rw-r--r-- | system/database/drivers/postgre/postgre_driver.php | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php index ddcf3f7c3..19f384ccc 100644 --- a/system/database/drivers/postgre/postgre_driver.php +++ b/system/database/drivers/postgre/postgre_driver.php @@ -44,10 +44,6 @@ class CI_DB_postgre_driver extends CI_DB { protected $_escape_char = '"'; - // clause and character used for LIKE escape sequences - protected $_like_escape_str = " ESCAPE '%s' "; - protected $_like_escape_chr = '!'; - protected $_random_keyword = ' RANDOM()'; // database specific random keyword /** @@ -132,7 +128,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; } // -------------------------------------------------------------------- @@ -453,22 +457,6 @@ class CI_DB_postgre_driver extends CI_DB { // -------------------------------------------------------------------- /** - * From Tables - * - * This function implicitly groups FROM tables so there is no confusion - * about operator precedence in harmony with SQL standards - * - * @param array - * @return string - */ - protected function _from_tables($tables) - { - return is_array($tables) ? implode(', ', $tables) : $tables; - } - - // -------------------------------------------------------------------- - - /** * Update statement * * Generates a platform-specific update string from the supplied data |