Contents
DROP GROUP
A historical DDL command for removing a database role
DROP GROUP
is a historical DDL command for removing a database role.
DROP GROUP
was added in PostgreSQL 7.0; since PostgreSQL 8.1 it has been an alias for DROP ROLE
.
Change history
- PostgreSQL 8.2
DROP GROUP IF EXISTS ...
syntax added (commit f8b54fe6)
- PostgreSQL 8.1
- PostgreSQL 7.0
- added (commit 99b8f845)
Examples
Basic DROP GROUP
execution:
postgres=# DROP GROUP foo; DROP ROLE
Attempting to drop a role which does not exist:
postgres=# DROP GROUP foo; ERROR: role "foo" does not exist
Safely attempting to drop a role which might not exist:
postgres=# DROP GROUP IF EXISTS foo; NOTICE: role "foo" does not exist, skipping DROP ROLE
Note thas as DROP GROUP
is an alias for DROP ROLE
, output returned for this command references roles.
For more examples see DROP ROLE
.
References
- PostgreSQL documentation: DROP GROUP