1ALTER GROUP()                    SQL Commands                    ALTER GROUP()
2
3
4

NAME

6       ALTER GROUP - change role name or membership
7
8

SYNOPSIS

10       ALTER GROUP groupname ADD USER username [, ... ]
11       ALTER GROUP groupname DROP USER username [, ... ]
12
13       ALTER GROUP groupname RENAME TO newname
14
15

DESCRIPTION

17       ALTER  GROUP  changes the attributes of a user group.  This is an obso‐
18       lete  command,  though  still  accepted  for  backwards  compatibility,
19       because groups (and users too) have been superseded by the more general
20       concept of roles.
21
22       The first two variants add users to a  group  or  remove  them  from  a
23       group.  (Any role can play the part of either a ``user'' or a ``group''
24       for this purpose.) These variants are effectively equivalent to  grant‐
25       ing  or  revoking membership in the role named as the ``group''; so the
26       preferred way  to  do  this  is  to  use  GRANT  [grant(7)]  or  REVOKE
27       [revoke(7)].
28
29       The third variant changes the name of the group. This is exactly equiv‐
30       alent to renaming the role with ALTER ROLE [alter_role(7)].
31

PARAMETERS

33       groupname
34              The name of the group (role) to modify.
35
36       username
37              Users (roles) that are to be added to or removed from the group.
38              The  users  must  already  exist; ALTER GROUP does not create or
39              drop users.
40
41       newname
42              The new name of the group.
43

EXAMPLES

45       Add users to a group:
46
47       ALTER GROUP staff ADD USER karl, john;
48
49       Remove a user from a group:
50
51       ALTER GROUP workers DROP USER beth;
52
53

COMPATIBILITY

55       There is no ALTER GROUP statement in the SQL standard.
56

SEE ALSO

58       GRANT [grant(7)], REVOKE [revoke(l)], ALTER ROLE [alter_role(l)]
59
60
61
62SQL - Language Statements         2008-06-08                     ALTER GROUP()
Impressum