ROLE_IS_MEMBER_OF - Amazon Redshift
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

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