CREATE GROUP

An SQL command for defining a role

CREATE GROUP is a historical DDL command for defining a role.

CREATE GROUP was added in PostgreSQL 7.0; since PostgreSQL 8.1 it has been an alias for CREATE ROLE.

Change history

Examples

Basic usage example for CREATE GROUP:

postgres=# CREATE GROUP bar;
CREATE ROLE

Note that as CREATE GROUP is an alias for CREATE ROLE, usage such as the following is possible, if somewhat counterintuitive:

postgres=# CREATE GROUP foo;
CREATE ROLE

postgres=# ALTER USER foo LOGIN ;
ALTER ROLE

Categories

DDL, SQL command, Users and roles

See also

CREATE ROLE, ALTER GROUP, DROP GROUP