选择语言 :

 Driver_Database_Driver_Postgre::close_connect

关闭链接

null Driver_Database_Driver_Postgre::close_connect( )
File: ./drivers/database/postgre/postgre.class.php
public function close_connect()

    if ($this->_connection_ids)foreach ($this->_connection_ids as $key=>$connection_id)
    {
        if ($connection_id && Database_Driver_Postgre::$_connection_instance[$connection_id])
        {
            Core::debug()->info('close '.$key.' postgre '.Database_Driver_Postgre::$_current_connection_id_to_hostname[$connection_id].' connection.');
            @pg_close(Database_Driver_Postgre::$_connection_instance[$connection_id]);

            unset(Database_Driver_Postgre::$_connection_instance[$connection_id]);
            unset(Database_Driver_Postgre::$_current_databases[$connection_id]);
            unset(Database_Driver_Postgre::$_current_charset[$connection_id]);
            unset(Database_Driver_Postgre::$_current_connection_id_to_hostname[$connection_id]);
        }
        else
        {
            Core::debug()->info($key.' postgre '.Database_Driver_Postgre::$_current_connection_id_to_hostname[$connection_id].' connection has closed.');
        }

        $this->_connection_ids[$key] = null;
    }
}