PostgreSQL 8.0.1 Documentation | ||||
---|---|---|---|---|
Prev | Fast Backward | Fast Forward | Next |
CREATE GROUP
Synopsis
Description
CREATE GROUP will create a new group of users. You must be a database superuser to use this command.
Note that both users and groups are defined at the database cluster level, and so are valid in all databases in the cluster.
Use ALTER GROUP to change a group's membership, and DROP GROUP to remove a group.
Parameters
- name
The name of the group.
- gid
The SYSID clause can be used to choose the PostgreSQL group ID of the new group. This is normally not necessary, but may be useful if you need to recreate a group referenced in the permissions of some object.
If this is not specified, the highest assigned group ID plus one (with a minimum of 100) will be used as default.
- username
A list of users to include in the group. The users must already exist.
Examples
Create an empty group:
Create a group with members: