diff --git a/scripts-available/CDB_Quota.sql b/scripts-available/CDB_Quota.sql index 5cf24d4..4b5c97d 100644 --- a/scripts-available/CDB_Quota.sql +++ b/scripts-available/CDB_Quota.sql @@ -36,7 +36,7 @@ BEGIN IF dice < pbfact THEN RAISE DEBUG 'Checking quota on table % (dice:%, needed:<%)', TG_RELID::text, dice, pbfact; BEGIN - qmax := cartodb._CDB_UserQuotaInBytes(); + qmax := public._CDB_UserQuotaInBytes(); EXCEPTION WHEN undefined_function THEN RAISE WARNING 'Missing _CDB_UserQuotaInBytes(), assuming no quota'; qmax := 0; @@ -67,12 +67,12 @@ DECLARE sql text; BEGIN BEGIN - current_quota := cartodb._CDB_UserQuotaInBytes(); + current_quota := public._CDB_UserQuotaInBytes(); EXCEPTION WHEN undefined_function THEN current_quota := 0; END; - sql := 'CREATE OR REPLACE FUNCTION cartodb._CDB_UserQuotaInBytes() ' + sql := 'CREATE OR REPLACE FUNCTION public._CDB_UserQuotaInBytes() ' || 'RETURNS int8 AS $X$ SELECT ' || bytes || '::int8 $X$ LANGUAGE sql IMMUTABLE'; EXECUTE sql;