{
    "content": [
        {
            "type": "text",
            "text": "# ALTER_GROUP(7) (man)\n\n**Summary:** ALTERGROUP - change role name or membership\n\n**Synopsis:** ALTER GROUP rolespecification ADD USER username [, ... ]\nALTER GROUP rolespecification DROP USER username [, ... ]\nwhere rolespecification can be:\nrolename\n| CURRENTROLE\n| CURRENTUSER\n| SESSIONUSER\nALTER GROUP groupname RENAME TO newname\n\n## Examples\n\n- `Add users to a group:`\n- `ALTER GROUP staff ADD USER karl, john;`\n- `Remove a user from a group:`\n- `ALTER GROUP workers DROP USER beth;`\n\n## See Also\n\n- GRANT(7)\n- REVOKE(7)\n- ALTERROLE(7)\n- GROUP(7)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (12 lines)\n- **DESCRIPTION** (12 lines)\n- **PARAMETERS** (10 lines)\n- **EXAMPLES** (8 lines)\n- **COMPATIBILITY** (2 lines)\n- **SEE ALSO** (5 lines)\n\n## Full Content\n\n### NAME\n\nALTERGROUP - change role name or membership\n\n### SYNOPSIS\n\nALTER GROUP rolespecification ADD USER username [, ... ]\nALTER GROUP rolespecification DROP USER username [, ... ]\n\nwhere rolespecification can be:\n\nrolename\n| CURRENTROLE\n| CURRENTUSER\n| SESSIONUSER\n\nALTER GROUP groupname RENAME TO newname\n\n### DESCRIPTION\n\nALTER GROUP changes the attributes of a user group. This is an obsolete command, though still\naccepted for backwards compatibility, because groups (and users too) have been superseded by\nthe more general concept of roles.\n\nThe first two variants add users to a group or remove them from a group. (Any role can play\nthe part of either a “user” or a “group” for this purpose.) These variants are effectively\nequivalent to granting or revoking membership in the role named as the “group”; so the\npreferred way to do this is to use GRANT or REVOKE.\n\nThe third variant changes the name of the group. This is exactly equivalent to renaming the\nrole with ALTER ROLE.\n\n### PARAMETERS\n\ngroupname\nThe name of the group (role) to modify.\n\nusername\nUsers (roles) that are to be added to or removed from the group. The users must already\nexist; ALTER GROUP does not create or drop users.\n\nnewname\nThe new name of the group.\n\n### EXAMPLES\n\nAdd users to a group:\n\nALTER GROUP staff ADD USER karl, john;\n\nRemove a user from a group:\n\nALTER GROUP workers DROP USER beth;\n\n### COMPATIBILITY\n\nThere is no ALTER GROUP statement in the SQL standard.\n\n### SEE ALSO\n\nGRANT(7), REVOKE(7), ALTER ROLE (ALTERROLE(7))\n\n\n\nPostgreSQL 14.23                                2026                                  ALTER GROUP(7)\n\n"
        }
    ],
    "structuredContent": {
        "command": "ALTER_GROUP",
        "section": "7",
        "mode": "man",
        "summary": "ALTERGROUP - change role name or membership",
        "synopsis": "ALTER GROUP rolespecification ADD USER username [, ... ]\nALTER GROUP rolespecification DROP USER username [, ... ]\nwhere rolespecification can be:\nrolename\n| CURRENTROLE\n| CURRENTUSER\n| SESSIONUSER\nALTER GROUP groupname RENAME TO newname",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [
            "Add users to a group:",
            "ALTER GROUP staff ADD USER karl, john;",
            "Remove a user from a group:",
            "ALTER GROUP workers DROP USER beth;"
        ],
        "see_also": [
            {
                "name": "GRANT",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/GRANT/7/json"
            },
            {
                "name": "REVOKE",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/REVOKE/7/json"
            },
            {
                "name": "ALTERROLE",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/ALTERROLE/7/json"
            },
            {
                "name": "GROUP",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/GROUP/7/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "PARAMETERS",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "COMPATIBILITY",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            }
        ]
    }
}