CDB_Federated_Server_Unregister: Drop owned in cascade
Since now views might be owned by other roles, we need to drop them in cascade to force deletion
This commit is contained in:
parent
64e185b841
commit
1b86517007
@ -301,7 +301,7 @@ BEGIN
|
||||
SET client_min_messages = ERROR;
|
||||
BEGIN
|
||||
EXECUTE FORMAT ('DROP USER MAPPING FOR PUBLIC SERVER %I', server_internal);
|
||||
EXECUTE FORMAT ('DROP OWNED BY %I', role_name);
|
||||
EXECUTE FORMAT ('DROP OWNED BY %I CASCADE', role_name);
|
||||
EXECUTE FORMAT ('DROP ROLE %I', role_name);
|
||||
EXCEPTION WHEN OTHERS THEN
|
||||
RAISE EXCEPTION 'Not enough permissions to drop the server "%"', server;
|
||||
|
Loading…
Reference in New Issue
Block a user