{
    "mode": "man",
    "parameter": "ALTER_POLICY",
    "section": "7",
    "url": "https://www.chedong.com/phpMan.php/man/ALTER_POLICY/7/json",
    "generated": "2026-06-16T10:02:13Z",
    "synopsis": "ALTER POLICY name ON tablename RENAME TO newname\nALTER POLICY name ON tablename\n[ TO { rolename | PUBLIC | CURRENTROLE | CURRENTUSER | SESSIONUSER } [, ...] ]\n[ USING ( usingexpression ) ]\n[ WITH CHECK ( checkexpression ) ]",
    "sections": {
        "NAME": {
            "content": "ALTERPOLICY - change the definition of a row-level security policy\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "ALTER POLICY name ON tablename RENAME TO newname\n\nALTER POLICY name ON tablename\n[ TO { rolename | PUBLIC | CURRENTROLE | CURRENTUSER | SESSIONUSER } [, ...] ]\n[ USING ( usingexpression ) ]\n[ WITH CHECK ( checkexpression ) ]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "ALTER POLICY changes the definition of an existing row-level security policy. Note that ALTER\nPOLICY only allows the set of roles to which the policy applies and the USING and WITH CHECK\nexpressions to be modified. To change other properties of a policy, such as the command to\nwhich it applies or whether it is permissive or restrictive, the policy must be dropped and\nrecreated.\n\nTo use ALTER POLICY, you must own the table that the policy applies to.\n\nIn the second form of ALTER POLICY, the role list, usingexpression, and checkexpression are\nreplaced independently if specified. When one of those clauses is omitted, the corresponding\npart of the policy is unchanged.\n",
            "subsections": []
        },
        "PARAMETERS": {
            "content": "name\nThe name of an existing policy to alter.\n\ntablename\nThe name (optionally schema-qualified) of the table that the policy is on.\n\nnewname\nThe new name for the policy.\n\nrolename\nThe role(s) to which the policy applies. Multiple roles can be specified at one time. To\napply the policy to all roles, use PUBLIC.\n\nusingexpression\nThe USING expression for the policy. See CREATE POLICY (CREATEPOLICY(7)) for details.\n\ncheckexpression\nThe WITH CHECK expression for the policy. See CREATE POLICY (CREATEPOLICY(7)) for\ndetails.\n",
            "subsections": []
        },
        "COMPATIBILITY": {
            "content": "ALTER POLICY is a PostgreSQL extension.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "CREATE POLICY (CREATEPOLICY(7)), DROP POLICY (DROPPOLICY(7))\n\nPostgreSQL 14.23                               2026                               ALTER POLICY(7)",
            "subsections": []
        }
    },
    "summary": "ALTERPOLICY - change the definition of a row-level security policy",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "CREATEPOLICY",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/CREATEPOLICY/7/json"
        },
        {
            "name": "DROPPOLICY",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/DROPPOLICY/7/json"
        },
        {
            "name": "POLICY",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/POLICY/7/json"
        }
    ]
}