]> git.joonet.de Git - adminer.git/commitdiff
PostgreSQL: Display ? instead of -1 rows in table overview (bug #883)
authorJakub Vrana <jakub@vrana.cz>
Thu, 6 Mar 2025 16:08:32 +0000 (17:08 +0100)
committerJakub Vrana <jakub@vrana.cz>
Thu, 6 Mar 2025 16:08:32 +0000 (17:08 +0100)
adminer/script.inc.php
changes.txt

index 0d807cd37b6ca12e400dc8dda07fd43e504ff947..6420ac210ed218111a972ca783b53175bc1e924e 100644 (file)
@@ -14,10 +14,12 @@ if ($_GET["script"] == "db") {
                        foreach ($sums + array("Auto_increment" => 0, "Rows" => 0) as $key => $val) {
                                if ($table_status[$key] != "") {
                                        $val = format_number($table_status[$key]);
-                                       json_row("$key-$name", ($key == "Rows" && $val && $table_status["Engine"] == ($jush == "pgsql" ? "table" : "InnoDB")
-                                               ? "~ $val"
-                                               : $val
-                                       ));
+                                       if ($val >= 0) {
+                                               json_row("$key-$name", ($key == "Rows" && $val && $table_status["Engine"] == ($jush == "pgsql" ? "table" : "InnoDB")
+                                                       ? "~ $val"
+                                                       : $val
+                                               ));
+                                       }
                                        if (isset($sums[$key])) {
                                                // ignore innodb_file_per_table because it is not active for tables created before it was enabled
                                                $sums[$key] += ($table_status["Engine"] != "InnoDB" || $key != "Data_free" ? $table_status[$key] : 0);
index 403148c7a92fedc1ac23ef27570084fc3b102bf5..344f92866dcd05dbd46c1f46fcbc7ef388365e87 100644 (file)
@@ -6,6 +6,7 @@ PostgreSQL: Do not alter indexes with expressions
 PostgreSQL: Fix export of indexes with expressions (bug #768)
 PostgreSQL: Display ENUM types
 PostgreSQL: Export ENUM types (bug #587)
+PostgreSQL: Display ? instead of -1 rows in table overview (bug #883)
 PostgreSQL: Show accessible databases to non-owners (regression from 4.9.1)
 PostgreSQL, MS SQL, Oracle: Hide table actions for information_schema
 SQLite: Support CHECK constraint