Reuser creator_role
Co-Authored-By: Alberto Romeu <alrocar@users.noreply.github.com>
This commit is contained in:
parent
f4be59cae0
commit
8ecd2cd5e2
@ -17,7 +17,7 @@ BEGIN
|
||||
obj.schema_name,
|
||||
obj.object_identity;
|
||||
SELECT rolname FROM pg_class JOIN pg_roles ON relowner = pg_roles.oid WHERE pg_class.oid = obj.objid INTO creator_role;
|
||||
SELECT value->>'ownership_role_name' from cdb_conf where key = (SELECT 'api_keys_' || rolname FROM pg_class JOIN pg_roles ON relowner = pg_roles.oid WHERE pg_class.oid = obj.objid) INTO owner_role;
|
||||
SELECT value->>'ownership_role_name' from cdb_conf where key = 'api_keys_' || creator_role INTO owner_role;
|
||||
IF owner_role IS NULL THEN
|
||||
CONTINUE;
|
||||
ELSE
|
||||
|
Loading…
Reference in New Issue
Block a user