From 6c57640901304f944cfe2b19651c6964362b3710 Mon Sep 17 00:00:00 2001 From: Kartones Date: Mon, 11 Aug 2014 15:26:13 +0200 Subject: [PATCH 1/4] CDB-3870 replaced priority of qmax inside checkquota --- NEWS | 7 +++++++ scripts-available/CDB_Quota.sql | 20 ++++++++++++-------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/NEWS b/NEWS index 61e601d..4a38534 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,10 @@ +0.3.5 (2014-08-11) +------------------ +Inverting priority of CDB_CheckQuota qmax so gies more priority to existing user quota function over parameter value. + +0.3.4 (2014-08-xx) +------------------ + 0.3.3 (2014-07-xx) ------------------ * Splitting of CartodbfyTable method in subfunctions to be able to call in fragments and evade timeouts on hot zones diff --git a/scripts-available/CDB_Quota.sql b/scripts-available/CDB_Quota.sql index fb718fd..70bd839 100644 --- a/scripts-available/CDB_Quota.sql +++ b/scripts-available/CDB_Quota.sql @@ -46,16 +46,20 @@ BEGIN ELSE schema_name := 'public'; END IF; - -- Hack to support old versions of CDB_CheckQuota with 2 params but without schema_name - IF TG_NARGS >= 2 AND TG_ARGV[1] <> '-1' THEN - qmax := TG_ARGV[1]; - ELSE + + -- By default try to use quota function, and if not present then rely on the one specified by params + BEGIN + EXECUTE FORMAT('SELECT %I._CDB_UserQuotaInBytes();', schema_name) INTO qmax; + EXCEPTION WHEN undefined_function THEN BEGIN - EXECUTE FORMAT('SELECT %I._CDB_UserQuotaInBytes();', schema_name) INTO qmax; - EXCEPTION WHEN undefined_function THEN - RAISE EXCEPTION 'Missing "%"._CDB_UserQuotaInBytes()', schema_name; + IF TG_NARGS >= 2 AND TG_ARGV[1] <> '-1' THEN + qmax := TG_ARGV[1]; + ELSE + RAISE EXCEPTION 'Missing "%"._CDB_UserQuotaInBytes()', schema_name; + END IF; END; - END IF; + END; + pbfact := TG_ARGV[0]; dice := random(); From a98b100182cfe26d004e2e3fb1478d9149eb62b2 Mon Sep 17 00:00:00 2001 From: Raul Ochoa Date: Mon, 11 Aug 2014 15:41:33 +0200 Subject: [PATCH 2/4] Ignore idea ide based settings --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 1edf917..549ecfa 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ results/ regression.* expected/test sql/test +.idea/* \ No newline at end of file From 93de996acc4c5a0967248843d6a49bc787e050eb Mon Sep 17 00:00:00 2001 From: Raul Ochoa Date: Mon, 11 Aug 2014 15:41:53 +0200 Subject: [PATCH 3/4] Fixes 0.3.5 version: - Version in Makefile - Upgrade path from 0.3.4 --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2beaa20..db9563c 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # cartodb/Makefile EXTENSION = cartodb -EXTVERSION = 0.3.4 +EXTVERSION = 0.3.5 SED = sed @@ -24,6 +24,7 @@ UPGRADABLE = \ 0.3.1 \ 0.3.2 \ 0.3.3 \ + 0.3.4 \ $(EXTVERSION)dev \ $(EXTVERSION)next \ $(END) From a747f16ecc6fdb5d1e7070b2cdbad9609a66a2bb Mon Sep 17 00:00:00 2001 From: Raul Ochoa Date: Mon, 11 Aug 2014 16:13:04 +0200 Subject: [PATCH 4/4] Fixes release dates --- NEWS | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 4a38534..0512dab 100644 --- a/NEWS +++ b/NEWS @@ -2,10 +2,11 @@ ------------------ Inverting priority of CDB_CheckQuota qmax so gies more priority to existing user quota function over parameter value. -0.3.4 (2014-08-xx) +0.3.4 (2014-08-01) ------------------ +Fixes issue with schemas in CDB_QueryTables -0.3.3 (2014-07-xx) +0.3.3 (2014-07-30) ------------------ * Splitting of CartodbfyTable method in subfunctions to be able to call in fragments and evade timeouts on hot zones