--- a/pgtoolkit/pgbrowser.py Tue Feb 04 16:10:04 2014 +0100
+++ b/pgtoolkit/pgbrowser.py Thu Mar 20 16:33:34 2014 +0100
@@ -55,7 +55,7 @@
class Index:
def __init__(self, browser, table,
name, primary, unique, clustered, valid, definition,
- columns):
+ columns, size):
self.browser = browser
self.table = table
self.name = name
@@ -65,6 +65,7 @@
self.valid = valid
self.definition = definition
self.columns = columns
+ self.size = size
class Table:
@@ -345,7 +346,8 @@
i.indisclustered as "clustered",
i.indisvalid as "valid",
pg_catalog.pg_get_indexdef(i.indexrelid, 0, true) as "definition",
- ARRAY(SELECT a.attname FROM pg_catalog.pg_attribute a WHERE a.attrelid = c2.oid ORDER BY attnum) AS "columns"
+ ARRAY(SELECT a.attname FROM pg_catalog.pg_attribute a WHERE a.attrelid = c2.oid ORDER BY attnum) AS "columns",
+ pg_catalog.pg_relation_size(c2.oid) as "size"
--c2.reltablespace as "tablespace_oid"
FROM pg_catalog.pg_class c
JOIN pg_catalog.pg_index i ON c.oid = i.indrelid