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

create_group

CREATEGROUProle_nameWITH,role_option

role_option

SUPERUSERNOSUPERUSERCREATEDBNOCREATEDBCREATEROLENOCREATEROLEINHERITNOINHERITLOGINNOLOGINCONNECTIONLIMITconnlimitENCRYPTEDPASSWORD password PASSWORDNULLVALIDUNTIL timestamp INROLE,role_nameINGROUP,role_nameROLE,role_nameADMIN,role_nameUSER,role_nameSYSIDuid

See CREATE ROLE for more details.

Examples

  • Create a sample group that can manage databases and roles.
yugabyte=# CREATE GROUP SysAdmin WITH CREATEDB CREATEROLE;

See also