mirror of
https://github.com/vrana/adminer.git
synced 2025-08-12 09:34:10 +02:00
PostgreSQL: Support indexes on materialized views (PR #467)
This commit is contained in:
@@ -293,6 +293,10 @@ if (isset($_GET["pgsql"])) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function supportsIndex($table_status) {
|
||||||
|
return $table_status["Engine"] != "view";
|
||||||
|
}
|
||||||
|
|
||||||
function hasCStyleEscapes() {
|
function hasCStyleEscapes() {
|
||||||
static $c_style;
|
static $c_style;
|
||||||
if ($c_style === null) {
|
if ($c_style === null) {
|
||||||
|
@@ -230,6 +230,14 @@ abstract class SqlDriver {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Check whether table supports indexes
|
||||||
|
* @param array result of table_status()
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
function supportsIndex($table_status) {
|
||||||
|
return !is_view($table_status);
|
||||||
|
}
|
||||||
|
|
||||||
/** Get defined check constraints
|
/** Get defined check constraints
|
||||||
* @param string
|
* @param string
|
||||||
* @return array [$name => $clause]
|
* @return array [$name => $clause]
|
||||||
|
@@ -26,16 +26,16 @@ if ($fields) {
|
|||||||
$adminer->tableStructurePrint($fields);
|
$adminer->tableStructurePrint($fields);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_view($table_status)) {
|
if (support("indexes") && $driver->supportsIndex($table_status)) {
|
||||||
if (support("indexes")) {
|
|
||||||
echo "<h3 id='indexes'>" . lang('Indexes') . "</h3>\n";
|
echo "<h3 id='indexes'>" . lang('Indexes') . "</h3>\n";
|
||||||
$indexes = indexes($TABLE);
|
$indexes = indexes($TABLE);
|
||||||
if ($indexes) {
|
if ($indexes) {
|
||||||
$adminer->tableIndexesPrint($indexes);
|
$adminer->tableIndexesPrint($indexes);
|
||||||
}
|
}
|
||||||
echo '<p class="links"><a href="' . h(ME) . 'indexes=' . urlencode($TABLE) . '">' . lang('Alter indexes') . "</a>\n";
|
echo '<p class="links"><a href="' . h(ME) . 'indexes=' . urlencode($TABLE) . '">' . lang('Alter indexes') . "</a>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!is_view($table_status)) {
|
||||||
if (fk_support($table_status)) {
|
if (fk_support($table_status)) {
|
||||||
echo "<h3 id='foreign-keys'>" . lang('Foreign keys') . "</h3>\n";
|
echo "<h3 id='foreign-keys'>" . lang('Foreign keys') . "</h3>\n";
|
||||||
$foreign_keys = foreign_keys($TABLE);
|
$foreign_keys = foreign_keys($TABLE);
|
||||||
|
@@ -2,6 +2,7 @@ Adminer dev:
|
|||||||
Fix bulk operations with tables
|
Fix bulk operations with tables
|
||||||
Remove duplicate columns from select (bug #670)
|
Remove duplicate columns from select (bug #670)
|
||||||
MariaDB: Fix link to status variable doc (bug #658)
|
MariaDB: Fix link to status variable doc (bug #658)
|
||||||
|
PostgreSQL: Support indexes on materialized views (PR #467)
|
||||||
|
|
||||||
Adminer 5.0.0 (released 2025-03-07):
|
Adminer 5.0.0 (released 2025-03-07):
|
||||||
Speed up with disabled output buffering
|
Speed up with disabled output buffering
|
||||||
|
Reference in New Issue
Block a user