1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-14 02:23:59 +02:00

PostgreSQL: Include inherited tables in table_status (bug #1031)

This commit is contained in:
Jakub Vrana
2025-04-14 13:13:08 +02:00
parent 3d2395fc59
commit 8783f4d3ac
4 changed files with 5 additions and 4 deletions

View File

@@ -427,12 +427,13 @@ ORDER BY 1";
obj_description(oid, 'pg_class') AS \"Comment\",
" . (min_version(12) ? "''" : "CASE WHEN relhasoids THEN 'oid' ELSE '' END") . " AS \"Oid\",
reltuples as \"Rows\",
inhparent AS inherited,
current_schema() AS nspname
FROM pg_class
LEFT JOIN pg_inherits ON inhrelid = oid
WHERE relkind IN ('r', 'm', 'v', 'f', 'p')
AND relnamespace = " . driver()->nsOid . "
AND " . ($name != "" ? "relname = " . q($name) : "inhparent IS NULL ORDER BY relname")) as $row //! Auto_increment
" . ($name != "" ? "AND relname = " . q($name) : "ORDER BY relname")) as $row //! Auto_increment
) {
$return[$row["Name"]] = $row;
}

View File

@@ -1083,7 +1083,7 @@ class Adminer {
foreach ($tables as $table => $status) {
$table = "$table"; // do not highlight "0" as active everywhere
$name = adminer()->tableName($status);
if ($name != "") {
if ($name != "" && !$status["inherited"]) {
echo '<li><a href="' . h(ME) . 'select=' . urlencode($table) . '"'
. bold($_GET["select"] == $table || $_GET["edit"] == $table, "select")
. " title='" . lang('Select data') . "'>" . lang('select') . "</a> "