Skip to content

Commit a2e99ac

Browse files
author
Mario de Frutos
authored
Merge pull request #327 from CartoDB/test_for_325
Added test for the case that arose in #325
2 parents fed64e4 + da5d3ea commit a2e99ac

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

test/CDB_CartodbfyTableTest.sql

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,11 @@ BEGIN;
385385
$$;
386386
ROLLBACK;
387387

388+
-- Long table name could cause possible sequence rename collision #325
389+
CREATE TABLE "wadus_table_9473e8f6-2da1-11e8-8bca-0204e4dfe4d8" ( cartodb_id serial primary key );
390+
SELECT CDB_CartodbfyTableCheck('wadus_table_9473e8f6-2da1-11e8-8bca-0204e4dfe4d8'::REGCLASS, 'Long table name could cause sequence collision while renaming #325');
391+
DROP TABLE "wadus_table_9473e8f6-2da1-11e8-8bca-0204e4dfe4d8";
392+
388393
-- TODO: table with existing custom-triggered the_geom
389394

390395
DROP FUNCTION CDB_CartodbfyTableCheck(regclass, text);

test/CDB_CartodbfyTableTest_expect

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,5 +150,8 @@ SET
150150
BEGIN
151151
DO
152152
ROLLBACK
153+
CREATE TABLE
154+
Long table name could cause sequence collision while renaming #325 cartodbfied fine
155+
DROP TABLE
153156
DROP FUNCTION
154157
DROP FUNCTION

0 commit comments

Comments
 (0)