* Support for Column Level Privileges
* Allow users to specify a template database at database creation time
* Support killing processes
+* Add ability to create indexes concurrently
Bugs
* Fix problems with query tracking on overly long queries
* Support 8.1 Reindex [Database|System] commands
* Expressional indexes
-* Allow indexes to be built concurrently [8.2]
* Create Index Asc/Desc, Nulls First/Last [8.3]
* @param $tablespace The tablespaces ('' means none/default)
* @return 0 success
*/
- function createIndex($name, $table, $columns, $type, $unique, $where, $tablespace) {
+ function createIndex($name, $table, $columns, $type, $unique, $where, $tablespace, $concurrently) {
$this->fieldClean($name);
$this->fieldClean($table);
$sql = "CREATE";
if ($unique) $sql .= " UNIQUE";
- $sql .= " INDEX \"{$name}\" ON \"{$this->_schema}\".\"{$table}\" USING {$type} ";
+ $sql .= " INDEX";
+ if ($concurrently) $sql .= " CONCURRENTLY";
+ $sql .= " \"{$name}\" ON \"{$this->_schema}\".\"{$table}\" USING {$type} ";
if (is_array($columns)) {
$this->arrayClean($columns);
function hasForeignKeysInfo() { return $this->hasConstraintsInfo(); }
function hasMagicTypes() { return true; }
function hasQueryKill() { return true; }
+ function hasConcurrentIndexBuild() { return true; }
}
?>
function hasCreateTableLikeWithConstraints() {return false;}
function hasSharedComments() {return false;}
+ function hasConcurrentIndexBuild() {return false;}
}
?>
echo "\t\t\t</select>\n\t\t</td>\n\t</tr>\n";
}
+ if ($data->hasConcurrentIndexBuild()) {
+ echo "<tr>";
+ echo "<th class=\"data left\" scope=\"row\"><label for=\"formConcur\">{$lang['strconcurrently']}</label></th>";
+ echo "<td class=\"data1\"><input type=\"checkbox\" id=\"formConcur\" name=\"formConcur\"", (isset($_POST['formConcur']) ? 'checked="checked"' : ''), " /></td>";
+ echo "</tr>";
+ }
+
echo "</table>";
echo "<p><input type=\"hidden\" name=\"action\" value=\"save_create_index\" />\n";
$lang['strconfcluster'] = 'Are you sure you want to cluster "%s"?';
$lang['strclusteredgood'] = 'Cluster complete.';
$lang['strclusteredbad'] = 'Cluster failed.';
+ $lang['strconcurrently'] = 'Concurrently';
// Rules
$lang['strrules'] = 'Rules';
$lang['strconfcluster'] = 'Are you sure you want to cluster "%s"?';
$lang['strclusteredgood'] = 'Cluster complete.';
$lang['strclusteredbad'] = 'Cluster failed.';
+ $lang['strconcurrently'] = 'Concurrently';
// Rules
$lang['strrules'] = 'Rules';