From 30186ac8cb08c8ff4845f143af8fec94b14cef30 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Thu, 8 May 2014 17:20:40 +0200 Subject: [PATCH] Pretend _CDB_UserQuotaInBytes has to stay in public Fixes run of the testsuite in the pre-extension model --- scripts-available/CDB_Quota.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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;