Modify sampling of table quota trigger #126
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
# cartodb/Makefile
|
# cartodb/Makefile
|
||||||
|
|
||||||
EXTENSION = cartodb
|
EXTENSION = cartodb
|
||||||
EXTVERSION = 0.9.2
|
EXTVERSION = 0.9.3
|
||||||
|
|
||||||
SED = sed
|
SED = sed
|
||||||
|
|
||||||
@@ -45,6 +45,7 @@ UPGRADABLE = \
|
|||||||
0.9.0 \
|
0.9.0 \
|
||||||
0.9.1 \
|
0.9.1 \
|
||||||
0.9.2 \
|
0.9.2 \
|
||||||
|
0.9.3 \
|
||||||
$(EXTVERSION)dev \
|
$(EXTVERSION)dev \
|
||||||
$(EXTVERSION)next \
|
$(EXTVERSION)next \
|
||||||
$(END)
|
$(END)
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
0.9.3 (2015-08-27)
|
||||||
|
------------------
|
||||||
|
* Modify sampling of quota trigger [#126](https://github.com/CartoDB/cartodb-postgresql/issues/126)
|
||||||
|
|
||||||
0.9.2 (2015-08-24)
|
0.9.2 (2015-08-24)
|
||||||
------------------
|
------------------
|
||||||
* Fix for `the_geom` column present but not SRID (EWKT) and other corner cases [#121](https://github.com/CartoDB/cartodb-postgresql/pull/121)
|
* Fix for `the_geom` column present but not SRID (EWKT) and other corner cases [#121](https://github.com/CartoDB/cartodb-postgresql/pull/121)
|
||||||
|
|||||||
@@ -222,7 +222,7 @@ BEGIN
|
|||||||
|
|
||||||
sql := 'CREATE TRIGGER test_quota BEFORE UPDATE OR INSERT ON '
|
sql := 'CREATE TRIGGER test_quota BEFORE UPDATE OR INSERT ON '
|
||||||
|| reloid::text
|
|| reloid::text
|
||||||
|| ' EXECUTE PROCEDURE public.CDB_CheckQuota(1, ''-1'', '''
|
|| ' EXECUTE PROCEDURE public.CDB_CheckQuota(0.1, ''-1'', '''
|
||||||
|| schema_name::text
|
|| schema_name::text
|
||||||
|| ''')';
|
|| ''')';
|
||||||
EXECUTE sql;
|
EXECUTE sql;
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
set client_min_messages to error;
|
set client_min_messages to error;
|
||||||
\set VERBOSITY default
|
\set VERBOSITY default
|
||||||
|
|
||||||
|
-- See the dice
|
||||||
|
SELECT setseed(0.5);
|
||||||
|
|
||||||
CREATE TABLE big(a int);
|
CREATE TABLE big(a int);
|
||||||
-- Try the legacy interface
|
-- Try the legacy interface
|
||||||
-- See https://github.com/CartoDB/cartodb-postgresql/issues/13
|
-- See https://github.com/CartoDB/cartodb-postgresql/issues/13
|
||||||
@@ -18,6 +21,7 @@ SELECT CDB_UserDataSize();
|
|||||||
SELECT cartodb._CDB_total_relation_size('public', 'big');
|
SELECT cartodb._CDB_total_relation_size('public', 'big');
|
||||||
SELECT cartodb._CDB_total_relation_size('public', 'nonexistent_table_name');
|
SELECT cartodb._CDB_total_relation_size('public', 'nonexistent_table_name');
|
||||||
-- END Test for #108
|
-- END Test for #108
|
||||||
|
SELECT setseed(0.9);
|
||||||
SELECT CDB_SetUserQuotaInBytes(2);
|
SELECT CDB_SetUserQuotaInBytes(2);
|
||||||
INSERT INTO big VALUES (8193);
|
INSERT INTO big VALUES (8193);
|
||||||
SELECT CDB_SetUserQuotaInBytes(0);
|
SELECT CDB_SetUserQuotaInBytes(0);
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
SET
|
SET
|
||||||
|
|
||||||
CREATE TABLE
|
CREATE TABLE
|
||||||
CREATE TRIGGER
|
CREATE TRIGGER
|
||||||
INSERT 0 1
|
INSERT 0 1
|
||||||
@@ -11,6 +12,7 @@ INSERT 0 2048
|
|||||||
454656
|
454656
|
||||||
909312
|
909312
|
||||||
0
|
0
|
||||||
|
|
||||||
2
|
2
|
||||||
ERROR: Quota exceeded by 443.998046875KB
|
ERROR: Quota exceeded by 443.998046875KB
|
||||||
0
|
0
|
||||||
|
|||||||
Reference in New Issue
Block a user