Fix recursive DDL trigger on create table

Closes #32
This commit is contained in:
Sandro Santilli
2014-05-28 09:02:02 +02:00
parent 85cc74b4f4
commit 2601364011
3 changed files with 69 additions and 13 deletions

View File

@@ -24,9 +24,13 @@ BEGIN
RETURN;
END IF;
PERFORM cartodb.cdb_disable_ddl_hooks();
-- CDB_CartodbfyTable must not create tables, or infinite loop will happen
PERFORM cartodb.CDB_CartodbfyTable(event_info.relation);
PERFORM cartodb.cdb_enable_ddl_hooks();
RAISE DEBUG 'Inserting into cartodb.CDB_TableMetadata';
-- Add entry to CDB_TableMetadata (should CartodbfyTable do this?)