Contents
ALTER GROUP
An SQL command for modifying name or membership of a role
ALTER GROUP
is a historical DDL command for modifying the name or membership of a role
ALTER GROUP
was added in PostgreSQL 7.0. It was superseded by ALTER ROLE
in PostgreSQL 8.1, though has been retained for backwards compatibility.
Change history
- PostgreSQL 14
ALTER GROUP ... OWNER TO CURRENT_ROLE
syntax added (commit 45b98057)
- PostgreSQL 9.5
ALTER GROUP { CURRENT_USER | SESSION_USER } ...
syntax added (commit 31eae602)
- PostgreSQL 8.1
- replaced by
ALTER ROLE
(commit 7762619e)
- replaced by
- PostgreSQL 7.4
ALTER GROUP ... RENAME TO ...
syntax added (commit b256f242)
- PostgreSQL 7.0
- added (commit 99b8f845)
Examples
Basic usage example for ALTER GROUP
:
postgres=# ALTER GROUP foo RENAME TO bar; ALTER ROLE
References
- PostgreSQL documentation: ALTER GROUP