Compare commits

..

4 Commits
0.9.2 ... 0.9.4

Author SHA1 Message Date
Rafa de la Torre
a5ccbdddcf Update version to 0.9.4 in Makefile #123 2015-08-27 16:47:10 +02:00
Rafa de la Torre
45383d7c8a Merge pull request #127 from CartoDB/123-fix-indices
Fix for index generation when renaming table #123
2015-08-27 16:44:19 +02:00
Rafa de la Torre
0057e2ddec Fix for index generation when renaming table #123 2015-08-27 16:33:46 +02:00
Rafa de la Torre
79cacb8ef4 Modify sampling of table quota trigger #126 2015-08-27 12:52:30 +02:00
7 changed files with 35 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
# cartodb/Makefile
EXTENSION = cartodb
EXTVERSION = 0.9.2
EXTVERSION = 0.9.4
SED = sed
@@ -45,6 +45,8 @@ UPGRADABLE = \
0.9.0 \
0.9.1 \
0.9.2 \
0.9.3 \
0.9.4 \
$(EXTVERSION)dev \
$(EXTVERSION)next \
$(END)

View File

@@ -1,3 +1,11 @@
0.9.4 (2015-08-28)
------------------
* Fixed issue with indices when renaming tables [#123](https://github.com/CartoDB/cartodb-postgresql/issues/123)
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)
------------------
* Fix for `the_geom` column present but not SRID (EWKT) and other corner cases [#121](https://github.com/CartoDB/cartodb-postgresql/pull/121)

View File

@@ -222,7 +222,7 @@ BEGIN
sql := 'CREATE TRIGGER test_quota BEFORE UPDATE OR INSERT ON '
|| reloid::text
|| ' EXECUTE PROCEDURE public.CDB_CheckQuota(1, ''-1'', '''
|| ' EXECUTE PROCEDURE public.CDB_CheckQuota(0.1, ''-1'', '''
|| schema_name::text
|| ''')';
EXECUTE sql;
@@ -1234,7 +1234,7 @@ BEGIN
AND c.oid = reloid
AND am.amname != 'gist'
LOOP
sql := Format('CREATE INDEX %s_%s_gix ON %s USING GIST (%s)', relname, rec.attname, reloid::text, rec.attname);
sql := Format('CREATE INDEX ON %s USING GIST (%s)', reloid::text, rec.attname);
PERFORM _CDB_SQL(sql, '_CDB_Add_Indexes');
END LOOP;

View File

@@ -216,6 +216,15 @@ WHERE c.conrelid = 't'::regclass and a.attrelid = c.conrelid
AND c.conkey[1] = a.attnum AND NOT a.attisdropped;
DROP TABLE t;
-- tables can be renamed and there's no index name clashing #123
CREATE TABLE original();
SELECT CDB_CartodbfyTable('original');
ALTER TABLE original RENAME TO original_renamed;
CREATE TABLE original();
SELECT CDB_CartodbfyTable('original');
DROP TABLE original_renamed;
DROP TABLE original;
-- TODO: table with existing custom-triggered the_geom
DROP FUNCTION CDB_CartodbfyTableCheck(regclass, text);

View File

@@ -51,5 +51,12 @@ CREATE TABLE
cartodb_id serial primary key cartodbfied fine
t_pkey|cartodb_id
DROP TABLE
CREATE TABLE
original
ALTER TABLE
CREATE TABLE
original
DROP TABLE
DROP TABLE
DROP FUNCTION
DROP FUNCTION

View File

@@ -1,6 +1,9 @@
set client_min_messages to error;
\set VERBOSITY default
-- See the dice
SELECT setseed(0.5);
CREATE TABLE big(a int);
-- Try the legacy interface
-- 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', 'nonexistent_table_name');
-- END Test for #108
SELECT setseed(0.9);
SELECT CDB_SetUserQuotaInBytes(2);
INSERT INTO big VALUES (8193);
SELECT CDB_SetUserQuotaInBytes(0);

View File

@@ -1,4 +1,5 @@
SET
CREATE TABLE
CREATE TRIGGER
INSERT 0 1
@@ -11,6 +12,7 @@ INSERT 0 2048
454656
909312
0
2
ERROR: Quota exceeded by 443.998046875KB
0