---
name: "create_group"
section: "7l"
platform: "linux"
package: "postgresql-client"
version: "7.2.1-2woody8"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/create_group/7l"
---

# create\_group(7l)

define a new user group

## NAME

CREATE GROUP - define a new user group

## SYNOPSIS

```
CREATE GROUP name [ [ WITH ] option [ ... ] ]
where option can be:
     SYSID gid
   | USER  username [, ...]

```

### INPUTS

- *name*

  The name of the group.

- *gid*

  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.

- *username*

  A list of users to include in the group. The users must already exist.

### OUTPUTS

- **CREATE GROUP**

  Message returned if the command completes successfully.

## DESCRIPTION

CREATE GROUP will create a new group in the database installation. Refer to the *Administrator's Guide* for information about using groups for authentication. You must be a database superuser to use this command.

Use ALTER GROUP \[**alter\_group**(l)\] to change a group's membership, and DROP GROUP \[**drop\_group**(l)\] 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

### SQL92

There is no **CREATE GROUP** statement in SQL92. Roles are similar in concept to groups.
