Add test for faulty use case #305
This commit is contained in:
parent
208ebb2724
commit
8db73ae9bd
@ -372,6 +372,19 @@ SELECT column_name FROM information_schema.columns WHERE table_name = 'test' AND
|
|||||||
DROP TABLE test;
|
DROP TABLE test;
|
||||||
SET client_min_messages TO error;
|
SET client_min_messages TO error;
|
||||||
|
|
||||||
|
-- Unique identifier generation can break CDB_CartodbfyTable #305
|
||||||
|
BEGIN;
|
||||||
|
DO $$
|
||||||
|
BEGIN
|
||||||
|
FOR i IN 1..150 LOOP
|
||||||
|
EXECUTE 'CREATE TABLE untitled_table();';
|
||||||
|
EXECUTE $query$SELECT CDB_CartodbfyTable('untitled_table');$query$;
|
||||||
|
EXECUTE 'ALTER TABLE untitled_table RENAME TO my_renamed_table_' || i;
|
||||||
|
END LOOP;
|
||||||
|
END;
|
||||||
|
$$;
|
||||||
|
ROLLBACK;
|
||||||
|
|
||||||
-- TODO: table with existing custom-triggered the_geom
|
-- TODO: table with existing custom-triggered the_geom
|
||||||
|
|
||||||
DROP FUNCTION CDB_CartodbfyTableCheck(regclass, text);
|
DROP FUNCTION CDB_CartodbfyTableCheck(regclass, text);
|
||||||
|
@ -147,5 +147,8 @@ NOTICE: Trying to recover data from _cartodb_id0 column
|
|||||||
|
|
||||||
DROP TABLE
|
DROP TABLE
|
||||||
SET
|
SET
|
||||||
|
BEGIN
|
||||||
|
DO
|
||||||
|
ROLLBACK
|
||||||
DROP FUNCTION
|
DROP FUNCTION
|
||||||
DROP FUNCTION
|
DROP FUNCTION
|
||||||
|
Loading…
Reference in New Issue
Block a user