Permalink
Browse files

Excluding spatial_ref_sys from user quota calculation #856

  • Loading branch information...
1 parent bc62a4e commit 7b5deacd8e81c2a0ec07ad35d2d5fbfbff7bd33e @demimismo demimismo committed Jul 30, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 app/models/user.rb
View
@@ -287,7 +287,8 @@ def database_exists?
def db_size_in_bytes
size = in_database(:as => :superuser).fetch("SELECT sum(pg_relation_size(table_name))
FROM information_schema.tables
- WHERE table_catalog = '#{database_name}' AND table_schema = 'public'").first[:sum]
+ WHERE table_catalog = '#{database_name}' AND table_schema = 'public'
+ AND table_name != 'spatial_ref_sys'").first[:sum]
# hack for the_geom_webmercator
size / 2

0 comments on commit 7b5deac

Please sign in to comment.