CartoDB / cartodb-postgresql

PostgreSQL extension for CartoDB
BSD 3-Clause "New" or "Revised" License
111 stars 52 forks source link

CDB_SyncTable fails with organization user roles #366

Open jgoizueta opened 5 years ago

jgoizueta commented 5 years ago

The user roles of org members are not allowed to create temporary tables:

PG::InsufficientPrivilege:
ERROR:  permission denied to create temporary tables in database "cartodb_user_xxxxxxxxxxx_db"
LINE 1: CREATE TEMP TABLE src_sync_511175814_65060(cartodb_id BIGINT...
                          ^
QUERY:  CREATE TEMP TABLE src_sync_511175814_65060(cartodb_id BIGINT, hash TEXT) ON COMMIT DROP
CONTEXT:  PL/pgSQL function cdb_synctable(regclass,regnamespace,name,name[]) line 36 at EXECUTE

A possible solution for this would be to avoid temporary table creation as in #365

cc @rafatower