Vacuum for PostgreSQL
This commit is contained in:
parent
a25fa67e06
commit
4cc29e0137
|
@ -26,8 +26,11 @@ if ($tables_views && !$error && !$_POST["search"]) {
|
||||||
$result = drop_tables($_POST["tables"]);
|
$result = drop_tables($_POST["tables"]);
|
||||||
}
|
}
|
||||||
$message = lang('Tables have been dropped.');
|
$message = lang('Tables have been dropped.');
|
||||||
} elseif ($jush == "sqlite") {
|
} elseif ($jush != "sql") {
|
||||||
$result = queries("VACUUM");
|
$result = ($jush == "sqlite"
|
||||||
|
? queries("VACUUM")
|
||||||
|
: apply_queries("VACUUM" . ($_POST["optimize"] ? "" : " ANALYZE"), $_POST["tables"])
|
||||||
|
);
|
||||||
$message = lang('Tables have been optimized.');
|
$message = lang('Tables have been optimized.');
|
||||||
} elseif ($_POST["tables"] && ($result = queries(($_POST["optimize"] ? "OPTIMIZE" : ($_POST["check"] ? "CHECK" : ($_POST["repair"] ? "REPAIR" : "ANALYZE"))) . " TABLE " . implode(", ", array_map('idf_escape', $_POST["tables"]))))) {
|
} elseif ($_POST["tables"] && ($result = queries(($_POST["optimize"] ? "OPTIMIZE" : ($_POST["check"] ? "CHECK" : ($_POST["repair"] ? "REPAIR" : "ANALYZE"))) . " TABLE " . implode(", ", array_map('idf_escape', $_POST["tables"]))))) {
|
||||||
while ($row = $result->fetch_assoc()) {
|
while ($row = $result->fetch_assoc()) {
|
||||||
|
@ -94,7 +97,7 @@ if ($adminer->homepage()) {
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
echo "<script type='text/javascript'>tableCheck();</script>\n";
|
echo "<script type='text/javascript'>tableCheck();</script>\n";
|
||||||
if (!information_schema(DB)) {
|
if (!information_schema(DB)) {
|
||||||
echo "<p>" . (ereg('^(sql|sqlite)$', $jush)
|
echo "<p>" . (ereg('^(sql|sqlite|pgsql)$', $jush)
|
||||||
? ($jush != "sqlite" ? "<input type='submit' value='" . lang('Analyze') . "'> " : "")
|
? ($jush != "sqlite" ? "<input type='submit' value='" . lang('Analyze') . "'> " : "")
|
||||||
. "<input type='submit' name='optimize' value='" . lang('Optimize') . "'> " : ""
|
. "<input type='submit' name='optimize' value='" . lang('Optimize') . "'> " : ""
|
||||||
) . ($jush == "sql" ? "<input type='submit' name='check' value='" . lang('Check') . "'> <input type='submit' name='repair' value='" . lang('Repair') . "'> " : "") . "<input type='submit' name='truncate' value='" . lang('Truncate') . "'" . confirm("formChecked(this, /tables/)") . "> <input type='submit' name='drop' value='" . lang('Drop') . "'" . confirm("formChecked(this, /tables|views/)", 1) . ">\n"; // 1 - eventStop
|
) . ($jush == "sql" ? "<input type='submit' name='check' value='" . lang('Check') . "'> <input type='submit' name='repair' value='" . lang('Repair') . "'> " : "") . "<input type='submit' name='truncate' value='" . lang('Truncate') . "'" . confirm("formChecked(this, /tables/)") . "> <input type='submit' name='drop' value='" . lang('Drop') . "'" . confirm("formChecked(this, /tables|views/)", 1) . ">\n"; // 1 - eventStop
|
||||||
|
|
|
@ -11,7 +11,7 @@ Don't quote bit type in export
|
||||||
Ability to disable export (customization)
|
Ability to disable export (customization)
|
||||||
Extensible list of databases (customization)
|
Extensible list of databases (customization)
|
||||||
MySQL: set autocommit after connect
|
MySQL: set autocommit after connect
|
||||||
SQLite: vacuum
|
SQLite, PostgreSQL: vacuum
|
||||||
PostgreSQL: fix alter foreign key
|
PostgreSQL: fix alter foreign key
|
||||||
PostgreSQL, SQLite: don't use LIKE for numbers (bug #3420408)
|
PostgreSQL, SQLite: don't use LIKE for numbers (bug #3420408)
|
||||||
PostgreSQL over PDO: connect if the eponymous database does not exist (bug #3391619)
|
PostgreSQL over PDO: connect if the eponymous database does not exist (bug #3391619)
|
||||||
|
|
Loading…
Reference in a new issue