From 83b05a860a5f208d15942b517385848cfe4887bb Mon Sep 17 00:00:00 2001 From: admin Date: Mon, 25 Sep 2006 21:06:46 +0000 Subject: --- .../database/drivers/postgre/postgre_utility.php | 28 +++++++--------------- 1 file changed, 9 insertions(+), 19 deletions(-) (limited to 'system/database/drivers/postgre') diff --git a/system/database/drivers/postgre/postgre_utility.php b/system/database/drivers/postgre/postgre_utility.php index 8e51623be..b31609aea 100644 --- a/system/database/drivers/postgre/postgre_utility.php +++ b/system/database/drivers/postgre/postgre_utility.php @@ -42,13 +42,13 @@ class CI_DB_postgre_utility extends CI_DB_utility { /** * Drop database * - * @access public + * @access private * @param string the database name * @return bool */ - function drop_database($name) + function _drop_database($name) { - return $this->db->query("DROP DATABASE ".$name); + return "DROP DATABASE ".$name; } // -------------------------------------------------------------------- @@ -56,22 +56,12 @@ class CI_DB_postgre_utility extends CI_DB_utility { /** * List databases * - * @access public + * @access private * @return bool */ - function list_databases() + function _list_databases() { - $query = $this->db->query("SELECT datname FROM pg_database"); - $dbs = array(); - if ($query->num_rows() > 0) - { - foreach ($query->result_array() as $row) - { - $dbs[] = current($row); - } - } - - return $dbs; + return "SELECT datname FROM pg_database"; } // -------------------------------------------------------------------- @@ -79,12 +69,12 @@ class CI_DB_postgre_utility extends CI_DB_utility { /** * Drop Table * - * @access public + * @access private * @return bool */ - function drop_table($table) + function _drop_table($table) { - return $this->db->query("DROP TABLE ".$this->db->_escape_table($name)." CASCADE"); + return "DROP TABLE ".$this->db->_escape_table($name)." CASCADE"; } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b