1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-06 22:56:46 +02:00

PostgreSQL: Partial Indexes

This commit is contained in:
salacr
2025-04-24 11:14:15 +02:00
committed by Jakub Vrana
parent 1466051402
commit c734deca84
9 changed files with 46 additions and 7 deletions

View File

@@ -355,6 +355,10 @@ class Adminer {
* @param TableStatus $tableStatus
*/
function tableIndexesPrint(array $indexes, array $tableStatus): void {
$partial = false;
foreach ($indexes as $name => $index) {
$partial |= !!$index["partial"];
}
echo "<table>\n";
$default_algorithm = first(driver()->indexAlgorithms($tableStatus));
foreach ($indexes as $name => $index) {
@@ -370,6 +374,9 @@ class Adminer {
echo "<tr title='" . h($name) . "'>";
echo "<th>$index[type]" . ($default_algorithm && $index['algorithm'] != $default_algorithm ? " ($index[algorithm])" : "");
echo "<td>" . implode(", ", $print);
if ($partial) {
echo "<td>" . ($index['partial'] ? "<code class='jush-" . JUSH . "'>WHERE " . h($index['partial']) : "");
}
echo "\n";
}
echo "</table>\n";