From 5806ac8f8d37923c4ed1ea8417417a2ea04d18ed Mon Sep 17 00:00:00 2001 From: Raul Ochoa Date: Fri, 4 Jul 2014 18:50:46 +0200 Subject: [PATCH] Force schema so it can calculate the size of the database with the proper schema --- scripts-available/CDB_Quota.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts-available/CDB_Quota.sql b/scripts-available/CDB_Quota.sql index 63ccd34..376bed0 100644 --- a/scripts-available/CDB_Quota.sql +++ b/scripts-available/CDB_Quota.sql @@ -7,7 +7,7 @@ $$ -- -- NOTE: division by 2 is an hack for the_geom_webmercator -- - SELECT coalesce(int8(sum(pg_total_relation_size(quote_ident(table_name))) / 2), 0) + SELECT coalesce(int8(sum(pg_total_relation_size(schema_name || '.' || table_name)) / 2), 0) AS quota FROM information_schema.tables WHERE table_catalog = current_database() AND table_schema = schema_name