diff --git a/adminer/db.inc.php b/adminer/db.inc.php index 76223f4a..0ff7bce4 100644 --- a/adminer/db.inc.php +++ b/adminer/db.inc.php @@ -26,8 +26,11 @@ if ($tables_views && !$error && !$_POST["search"]) { $result = drop_tables($_POST["tables"]); } $message = lang('Tables have been dropped.'); - } elseif ($jush == "sqlite") { - $result = queries("VACUUM"); + } elseif ($jush != "sql") { + $result = ($jush == "sqlite" + ? queries("VACUUM") + : apply_queries("VACUUM" . ($_POST["optimize"] ? "" : " ANALYZE"), $_POST["tables"]) + ); $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"]))))) { while ($row = $result->fetch_assoc()) { @@ -94,7 +97,7 @@ if ($adminer->homepage()) { echo "\n"; echo "\n"; if (!information_schema(DB)) { - echo "

" . (ereg('^(sql|sqlite)$', $jush) + echo "

" . (ereg('^(sql|sqlite|pgsql)$', $jush) ? ($jush != "sqlite" ? " " : "") . " " : "" ) . ($jush == "sql" ? " " : "") . " \n"; // 1 - eventStop diff --git a/changes.txt b/changes.txt index 35cb4732..38e2b09e 100644 --- a/changes.txt +++ b/changes.txt @@ -11,7 +11,7 @@ Don't quote bit type in export Ability to disable export (customization) Extensible list of databases (customization) MySQL: set autocommit after connect -SQLite: vacuum +SQLite, PostgreSQL: vacuum PostgreSQL: fix alter foreign key PostgreSQL, SQLite: don't use LIKE for numbers (bug #3420408) PostgreSQL over PDO: connect if the eponymous database does not exist (bug #3391619)