diff --git a/scripts-available/CDB_Organizations.sql b/scripts-available/CDB_Organizations.sql index 7f7217a..35f838a 100644 --- a/scripts-available/CDB_Organizations.sql +++ b/scripts-available/CDB_Organizations.sql @@ -119,7 +119,7 @@ BEGIN d.refobjsubid > 0 AND d.classid = ''pg_class''::regclass AND c.relkind = ''S''::"char" AND - d.refobjid = (''' || from_schema || '.' || table_name ||''')::regclass'; + d.refobjid = (''' || quote_ident(from_schema) || '.' || quote_ident(table_name) ||''')::regclass'; END $$ LANGUAGE PLPGSQL VOLATILE PARALLEL UNSAFE;