]> git.joonet.de Git - adminer.git/commitdiff
PostgreSQL: Compute size of all databases (bug #881)
authorJakub Vrana <jakub@vrana.cz>
Tue, 4 Mar 2025 18:40:30 +0000 (19:40 +0100)
committerJakub Vrana <jakub@vrana.cz>
Tue, 4 Mar 2025 18:40:42 +0000 (19:40 +0100)
adminer/drivers/pgsql.inc.php
changes.txt

index 0d05854e781b97956f117452c801446561d86130..33be88ff26812e99e8f376da17f76dd498b9b64d 100644 (file)
@@ -336,7 +336,14 @@ ORDER BY 1";
        }
 
        function count_tables($databases) {
-               return array(); // would require reconnect
+               global $connection;
+               $return = array();
+               foreach ($databases as $db) {
+                       if ($connection->select_db($db)) {
+                               $return[$db] = count(tables_list());
+                       }
+               }
+               return $return;
        }
 
        function table_status($name = "") {
index 0f693f8d330a739513031826f8bbf8ab490e6f28..103f917cddc18c3945dc853d3960dc60cd3d88ae 100644 (file)
@@ -1,6 +1,7 @@
 Adminer dev:
 Speed up with disabled output buffering
 Don't autofocus computed fields in insert form
+PostgreSQL: Compute size of all databases (bug #881)
 PostgreSQL: Do not alter indexes with expressions
 PostgreSQL: Fix export of indexes with expressions (bug #768)
 PostgreSQL: Display ENUM types