CREATE GROUP
Synopsis
Use the CREATE GROUP
statement to create a group role. CREATE GROUP
is an alias for CREATE ROLE
and is used to create a group role.
Syntax
create_group ::= CREATE GROUP role_name
[ [ WITH ] role_option [ , ... ] ]
role_option ::= SUPERUSER
| NOSUPERUSER
| CREATEDB
| NOCREATEDB
| CREATEROLE
| NOCREATEROLE
| INHERIT
| NOINHERIT
| LOGIN
| NOLOGIN
| CONNECTION LIMIT connlimit
| [ ENCRYPTED ] PASSWORD ' password '
| PASSWORD NULL
| VALID UNTIL ' timestamp '
| IN ROLE role_name [ , ... ]
| IN GROUP role_name [ , ... ]
| ROLE role_name [ , ... ]
| ADMIN role_name [ , ... ]
| USER role_name [ , ... ]
| SYSID uid
See CREATE ROLE
for more details.
Examples
- Create a sample group that can manage databases and roles.
yugabyte=# CREATE GROUP SysAdmin WITH CREATEDB CREATEROLE;