summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/postgre
diff options
context:
space:
mode:
Diffstat (limited to 'system/database/drivers/postgre')
-rw-r--r--system/database/drivers/postgre/postgre_forge.php11
-rw-r--r--system/database/drivers/postgre/postgre_utility.php17
2 files changed, 24 insertions, 4 deletions
diff --git a/system/database/drivers/postgre/postgre_forge.php b/system/database/drivers/postgre/postgre_forge.php
index aac82c1e5..b08fa5177 100644
--- a/system/database/drivers/postgre/postgre_forge.php
+++ b/system/database/drivers/postgre/postgre_forge.php
@@ -35,13 +35,20 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*/
class CI_DB_postgre_forge extends CI_DB_forge {
+ /**
+ * DROP TABLE statement
+ *
+ * @var string
+ */
protected $_drop_table = 'DROP TABLE IF EXISTS %s CASCADE';
+ // --------------------------------------------------------------------
+
/**
* Process Fields
*
* @param mixed $fields
- * @param array $primary_keys = array()
+ * @param array $primary_keys
* @return string
*/
protected function _process_fields($fields, $primary_keys = array())
@@ -195,7 +202,7 @@ class CI_DB_postgre_forge extends CI_DB_forge {
* @param string $alter_type the ALTER type (ADD, DROP, CHANGE)
* @param string $table the table name
* @param string $fields the column definition
- * @param string $after_field = ''
+ * @param string $after_field
* @return string
*/
protected function _alter_table($alter_type, $table, $fields, $after_field = '')
diff --git a/system/database/drivers/postgre/postgre_utility.php b/system/database/drivers/postgre/postgre_utility.php
index 96cd90e92..bae1c6704 100644
--- a/system/database/drivers/postgre/postgre_utility.php
+++ b/system/database/drivers/postgre/postgre_utility.php
@@ -35,13 +35,26 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*/
class CI_DB_postgre_utility extends CI_DB_utility {
+ /**
+ * List databases statement
+ *
+ * @var string
+ */
protected $_list_databases = 'SELECT datname FROM pg_database';
+
+ /**
+ * OPTIMIZE TABLE statement
+ *
+ * @var string
+ */
protected $_optimize_table = 'REINDEX TABLE %s';
+ // --------------------------------------------------------------------
+
/**
- * Postgre Export
+ * Export
*
- * @param array Preferences
+ * @param array $params Preferences
* @return mixed
*/
protected function _backup($params = array())