From 214583f1ba4c026141e595dac5868d5074095a7e Mon Sep 17 00:00:00 2001
From: Andrey Andreev <narf@bofh.bg>
Date: Thu, 26 Jan 2012 16:39:09 +0200
Subject: Improve the PostgreSQL database driver

---
 .../database/drivers/postgre/postgre_utility.php   | 33 +++++++++-------------
 1 file changed, 13 insertions(+), 20 deletions(-)

(limited to 'system/database/drivers/postgre/postgre_utility.php')

diff --git a/system/database/drivers/postgre/postgre_utility.php b/system/database/drivers/postgre/postgre_utility.php
index dffd8c549..c175a382b 100644
--- a/system/database/drivers/postgre/postgre_utility.php
+++ b/system/database/drivers/postgre/postgre_utility.php
@@ -1,13 +1,13 @@
-<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 /**
  * CodeIgniter
  *
  * An open source application development framework for PHP 5.1.6 or newer
  *
  * NOTICE OF LICENSE
- * 
+ *
  * Licensed under the Open Software License version 3.0
- * 
+ *
  * This source file is subject to the Open Software License (OSL 3.0) that is
  * bundled with this package in the files license.txt / license.rst.  It is
  * also available through the world wide web at this URL:
@@ -25,8 +25,6 @@
  * @filesource
  */
 
-// ------------------------------------------------------------------------
-
 /**
  * Postgre Utility Class
  *
@@ -39,12 +37,11 @@ class CI_DB_postgre_utility extends CI_DB_utility {
 	/**
 	 * List databases
 	 *
-	 * @access	private
-	 * @return	bool
+	 * @return	string
 	 */
-	function _list_databases()
+	public function _list_databases()
 	{
-		return "SELECT datname FROM pg_database";
+		return 'SELECT datname FROM pg_database';
 	}
 
 	// --------------------------------------------------------------------
@@ -54,13 +51,12 @@ class CI_DB_postgre_utility extends CI_DB_utility {
 	 *
 	 * Is table optimization supported in Postgre?
 	 *
-	 * @access	private
 	 * @param	string	the table name
-	 * @return	object
+	 * @return	string
 	 */
-	function _optimize_table($table)
+	public function _optimize_table($table)
 	{
-		return FALSE;
+		return 'REINDEX TABLE '.$table;
 	}
 
 	// --------------------------------------------------------------------
@@ -70,11 +66,10 @@ class CI_DB_postgre_utility extends CI_DB_utility {
 	 *
 	 * Are table repairs supported in Postgre?
 	 *
-	 * @access	private
 	 * @param	string	the table name
-	 * @return	object
+	 * @return	bool
 	 */
-	function _repair_table($table)
+	public function _repair_table($table)
 	{
 		return FALSE;
 	}
@@ -84,17 +79,15 @@ class CI_DB_postgre_utility extends CI_DB_utility {
 	/**
 	 * Postgre Export
 	 *
-	 * @access	private
 	 * @param	array	Preferences
 	 * @return	mixed
 	 */
-	function _backup($params = array())
+	public function _backup($params = array())
 	{
 		// Currently unsupported
 		return $this->db->display_error('db_unsuported_feature');
 	}
 }
 
-
 /* End of file postgre_utility.php */
-/* Location: ./system/database/drivers/postgre/postgre_utility.php */
\ No newline at end of file
+/* Location: ./system/database/drivers/postgre/postgre_utility.php */
-- 
cgit v1.2.3-24-g4f1b