CREATE GROUP
SQL - Language Statements
CREATE GROUP
Creates a new group
2000-01-14
CREATE GROUP name
[ WITH
[ SYSID gid ]
[ USER username [, ...] ] ]
2000-01-14
Inputs
name
The name of the group.
gid
The SYSID clause can be used to choose
the Postgres group id of the new
group. It is not necessary to do so, however.
If this is not specified, the highest assigned group id plus one,
starting at 1, will be used as default.
username
A list of users to include in the group. The users must already exist.
2000-01-14
Outputs
CREATE GROUP
Message returned if the command completes successfully.
2000-01-14
Description
CREATE GROUP will create a new group in the database installation.
Refer to the adminstrator's guide for information about using groups
for authentication.
You must be a database superuser to use this command.
Use
to change a group's membership, and to remove a group.
Usage
Create an empty group:
CREATE GROUP staff
Create a group with members:
CREATE GROUP marketing WITH USER jonathan, david
Compatibility
2000-01-14
SQL92
There is no CREATE GROUP statement in SQL92.
Roles are similar in concept to groups.