1ALTER GROUP(7)          PostgreSQL 9.2.24 Documentation         ALTER GROUP(7)
2
3
4

NAME

6       ALTER_GROUP - change role name or membership
7

SYNOPSIS

9       ALTER GROUP group_name ADD USER user_name [, ... ]
10       ALTER GROUP group_name DROP USER user_name [, ... ]
11
12       ALTER GROUP group_name RENAME TO new_name
13

DESCRIPTION

15       ALTER GROUP changes the attributes of a user group. This is an obsolete
16       command, though still accepted for backwards compatibility, because
17       groups (and users too) have been superseded by the more general concept
18       of roles.
19
20       The first two variants add users to a group or remove them from a
21       group. (Any role can play the part of either a “user” or a “group” for
22       this purpose.) These variants are effectively equivalent to granting or
23       revoking membership in the role named as the “group”; so the preferred
24       way to do this is to use GRANT(7) or REVOKE(7).
25
26       The third variant changes the name of the group. This is exactly
27       equivalent to renaming the role with ALTER ROLE (ALTER_ROLE(7)).
28

PARAMETERS

30       group_name
31           The name of the group (role) to modify.
32
33       user_name
34           Users (roles) that are to be added to or removed from the group.
35           The users must already exist; ALTER GROUP does not create or drop
36           users.
37
38       new_name
39           The new name of the group.
40

EXAMPLES

42       Add users to a group:
43
44           ALTER GROUP staff ADD USER karl, john;
45
46       Remove a user from a group:
47
48           ALTER GROUP workers DROP USER beth;
49

COMPATIBILITY

51       There is no ALTER GROUP statement in the SQL standard.
52

SEE ALSO

54       GRANT(7), REVOKE(7), ALTER ROLE (ALTER_ROLE(7))
55
56
57
58PostgreSQL 9.2.24                 2017-11-06                    ALTER GROUP(7)
Impressum