.\\" auto-generated by docbook2man-spec $Revision: 1.25 $
.TH "CREATE GROUP" "l" "2002-01-30" "SQL - Language Statements" "SQL Commands"
.SH NAME
CREATE GROUP \- define a new user group
.SH SYNOPSIS
.sp
.nf
CREATE GROUP \fIname\fR [ [ WITH ] \fIoption\fR [ ... ] ]

where \fIoption\fR can be:

     SYSID \fIgid\fR
   | USER  \fIusername\fR [, ...]
  
.sp
.fi
.SS "INPUTS"
.PP
.TP
\fB\fIname\fB\fR
The name of the group.
.TP
\fB\fIgid\fB\fR
The SYSID clause can be used to choose
the PostgreSQL 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.
.TP
\fB\fIusername\fB\fR
A list of users to include in the group. The users must already exist.
.PP
.SS "OUTPUTS"
.PP
.TP
\fBCREATE GROUP\fR
Message returned if the command completes successfully.
.PP
.SH "DESCRIPTION"
.PP
CREATE GROUP will create a new group in the database installation.
Refer to the \fIAdministrator's Guide\fR for information about using groups
for authentication.
You must be a database superuser to use this command.
.PP
Use ALTER GROUP [\fBalter_group\fR(l)]
to change a group's membership, and DROP GROUP [\fBdrop_group\fR(l)] to remove a group.
.SH "USAGE"
.PP
Create an empty group:
.sp
.nf
CREATE GROUP staff;
.sp
.fi
.PP
Create a group with members:
.sp
.nf
CREATE GROUP marketing WITH USER jonathan, david;
.sp
.fi
.SH "COMPATIBILITY"
.SS "SQL92"
.PP
There is no \fBCREATE GROUP\fR statement in SQL92.
Roles are similar in concept to groups.
