PostgreSQL: Fix index size computation
This commit is contained in:
parent
b8cd3b317d
commit
6ee4692afd
|
@ -244,7 +244,7 @@ ORDER BY 1";
|
|||
|
||||
function table_status($name = "") {
|
||||
$return = array();
|
||||
foreach (get_rows("SELECT c.relname AS \"Name\", CASE c.relkind WHEN 'r' THEN 'table' ELSE 'view' END AS \"Engine\", pg_relation_size(c.oid) AS \"Data_length\", pg_indexes_size(oid) AS \"Index_length\", obj_description(c.oid, 'pg_class') AS \"Comment\", c.relhasoids::int AS \"Oid\", c.reltuples as \"Rows\", n.nspname
|
||||
foreach (get_rows("SELECT c.relname AS \"Name\", CASE c.relkind WHEN 'r' THEN 'table' ELSE 'view' END AS \"Engine\", pg_relation_size(c.oid) AS \"Data_length\", pg_indexes_size(c.oid) AS \"Index_length\", obj_description(c.oid, 'pg_class') AS \"Comment\", c.relhasoids::int AS \"Oid\", c.reltuples as \"Rows\", n.nspname
|
||||
FROM pg_class c
|
||||
JOIN pg_namespace n ON(n.nspname = current_schema() AND n.oid = c.relnamespace)
|
||||
WHERE relkind IN ('r','v')
|
||||
|
|
Loading…
Reference in a new issue