Amazon Redshift will no longer support the creation of new Python UDFs starting November 1, 2025.
If you would like to use Python UDFs, create the UDFs prior to that date.
Existing Python UDFs will continue to function as normal. For more information, see the
blog post
ROLE_IS_MEMBER_OF
Returns true if the role is a member of another role. Superusers can check the membership of all roles. Regular users who have the ACCESS SYSTEM TABLE permission can check all users' membership. Otherwise, regular users can only check roles to which they have access. Amazon Redshift errors out if the provided roles don't exist or the current user doesn't have access to the role.
Syntax
role_is_member_of( role_name, granted_role_name)
Arguments
- role_name
-
The name of the role.
- granted_role_name
-
The name of the granted role.
Return type
Returns a BOOLEAN.
Example
The following query confirms that the role isn't a member of role1 nor role2.
SELECT role_is_member_of('role1', 'role2'); role_is_member_of ------------------- False