|
|
@ -7,7 +7,7 @@ $$
|
|
|
|
--
|
|
|
|
--
|
|
|
|
-- NOTE: division by 2 is an hack for the_geom_webmercator
|
|
|
|
-- 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
|
|
|
|
AS quota
|
|
|
|
FROM information_schema.tables
|
|
|
|
FROM information_schema.tables
|
|
|
|
WHERE table_catalog = current_database() AND table_schema = schema_name
|
|
|
|
WHERE table_catalog = current_database() AND table_schema = schema_name
|
|
|
|