{
    "content": [
        {
            "type": "text",
            "text": "# ALTER_USER_MAPPING (man)\n\n## NAME\n\nALTERUSERMAPPING - change the definition of a user mapping\n\n## SYNOPSIS\n\nALTER USER MAPPING FOR { username | USER | CURRENTROLE | CURRENTUSER | SESSIONUSER | PUBLIC }\nSERVER servername\nOPTIONS ( [ ADD | SET | DROP ] option ['value'] [, ... ] )\n\n## DESCRIPTION\n\nALTER USER MAPPING changes the definition of a user mapping.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **PARAMETERS**\n- **EXAMPLES**\n- **COMPATIBILITY**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "ALTER_USER_MAPPING",
        "section": "",
        "mode": "man",
        "summary": "ALTERUSERMAPPING - change the definition of a user mapping",
        "synopsis": "ALTER USER MAPPING FOR { username | USER | CURRENTROLE | CURRENTUSER | SESSIONUSER | PUBLIC }\nSERVER servername\nOPTIONS ( [ ADD | SET | DROP ] option ['value'] [, ... ] )",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [
            "Change the password for user mapping bob, server foo:",
            "ALTER USER MAPPING FOR bob SERVER foo OPTIONS (SET password 'public');"
        ],
        "see_also": [
            {
                "name": "CREATEUSERMAPPING",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/CREATEUSERMAPPING/7/json"
            },
            {
                "name": "DROPUSERMAPPING",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/DROPUSERMAPPING/7/json"
            },
            {
                "name": "MAPPING",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/MAPPING/7/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "PARAMETERS",
                "lines": 13,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "COMPATIBILITY",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "ALTERUSERMAPPING - change the definition of a user mapping\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "ALTER USER MAPPING FOR { username | USER | CURRENTROLE | CURRENTUSER | SESSIONUSER | PUBLIC }\nSERVER servername\nOPTIONS ( [ ADD | SET | DROP ] option ['value'] [, ... ] )\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "ALTER USER MAPPING changes the definition of a user mapping.\n\nThe owner of a foreign server can alter user mappings for that server for any user. Also, a\nuser can alter a user mapping for their own user name if USAGE privilege on the server has\nbeen granted to the user.\n",
                "subsections": []
            },
            "PARAMETERS": {
                "content": "username\nUser name of the mapping.  CURRENTROLE, CURRENTUSER, and USER match the name of the\ncurrent user.  PUBLIC is used to match all present and future user names in the system.\n\nservername\nServer name of the user mapping.\n\nOPTIONS ( [ ADD | SET | DROP ] option ['value'] [, ... ] )\nChange options for the user mapping. The new options override any previously specified\noptions.  ADD, SET, and DROP specify the action to be performed.  ADD is assumed if no\noperation is explicitly specified. Option names must be unique; options are also\nvalidated by the server's foreign-data wrapper.\n",
                "subsections": []
            },
            "EXAMPLES": {
                "content": "Change the password for user mapping bob, server foo:\n\nALTER USER MAPPING FOR bob SERVER foo OPTIONS (SET password 'public');\n",
                "subsections": []
            },
            "COMPATIBILITY": {
                "content": "ALTER USER MAPPING conforms to ISO/IEC 9075-9 (SQL/MED). There is a subtle syntax issue: The\nstandard omits the FOR key word. Since both CREATE USER MAPPING and DROP USER MAPPING use FOR\nin analogous positions, and IBM DB2 (being the other major SQL/MED implementation) also\nrequires it for ALTER USER MAPPING, PostgreSQL diverges from the standard here in the\ninterest of consistency and interoperability.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "CREATE USER MAPPING (CREATEUSERMAPPING(7)), DROP USER MAPPING (DROPUSERMAPPING(7))\n\n\n\nPostgreSQL 14.23                                2026                           ALTER USER MAPPING(7)",
                "subsections": []
            }
        }
    }
}