Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

USER_IS_MEMBER_OF

Focus mode
USER_IS_MEMBER_OF - Amazon Redshift

Returns true if the user is a member of a role or group. Superusers can check the membership of all users. Regular users who are members of the sys:secadmin or sys:superuser role can check all users' membership. Otherwise, regular users can only check themselves. Amazon Redshift sends an error if the provided identities don't exist or the current user doesn't have access to the role.

Syntax

user_is_member_of( user_name, role_name | group_name)

Arguments

user_name

The name of the user.

role_name

The name of the role.

group_name

The name of the group.

Return type

Returns a BOOLEAN.

Example

The following query confirms that the user isn't a member of role1.

SELECT user_is_member_of('reguser', 'role1'); user_is_member_of ------------------- False

On this page

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.