diff options
Diffstat (limited to 'system')
-rw-r--r-- | system/database/DB_driver.php | 2 | ||||
-rw-r--r-- | system/database/drivers/postgre/postgre_utility.php | 6 |
2 files changed, 2 insertions, 6 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index b41a42051..15195b20a 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -651,7 +651,7 @@ class CI_DB_driver { */ public function is_write_type($sql) { - return (bool) preg_match('/^\s*"?(SET|INSERT|UPDATE|DELETE|REPLACE|CREATE|DROP|TRUNCATE|LOAD DATA|COPY|ALTER|RENAME|GRANT|REVOKE|LOCK|UNLOCK|OPTIMIZE)\s+/i', $sql); + return (bool) preg_match('/^\s*"?(SET|INSERT|UPDATE|DELETE|REPLACE|CREATE|DROP|TRUNCATE|LOAD DATA|COPY|ALTER|RENAME|GRANT|REVOKE|LOCK|UNLOCK|OPTIMIZE|REINDEX)\s+/i', $sql); } // -------------------------------------------------------------------- diff --git a/system/database/drivers/postgre/postgre_utility.php b/system/database/drivers/postgre/postgre_utility.php index c175a382b..1e9580389 100644 --- a/system/database/drivers/postgre/postgre_utility.php +++ b/system/database/drivers/postgre/postgre_utility.php @@ -49,14 +49,12 @@ class CI_DB_postgre_utility extends CI_DB_utility { /** * Optimize table query * - * Is table optimization supported in Postgre? - * * @param string the table name * @return string */ public function _optimize_table($table) { - return 'REINDEX TABLE '.$table; + return 'REINDEX TABLE '.$this->db->protect_identifiers($table); } // -------------------------------------------------------------------- @@ -64,8 +62,6 @@ class CI_DB_postgre_utility extends CI_DB_utility { /** * Repair table query * - * Are table repairs supported in Postgre? - * * @param string the table name * @return bool */ |