{
    "mode": "man",
    "parameter": "DROP_POLICY",
    "section": "7",
    "url": "https://www.chedong.com/phpMan.php/man/DROP_POLICY/7/json",
    "generated": "2026-06-15T13:13:37Z",
    "synopsis": "DROP POLICY [ IF EXISTS ] name ON tablename [ CASCADE | RESTRICT ]",
    "sections": {
        "NAME": {
            "content": "DROPPOLICY - remove a row-level security policy from a table\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "DROP POLICY [ IF EXISTS ] name ON tablename [ CASCADE | RESTRICT ]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "DROP POLICY removes the specified policy from the table. Note that if the last policy is\nremoved for a table and the table still has row-level security enabled via ALTER TABLE, then\nthe default-deny policy will be used.  ALTER TABLE ... DISABLE ROW LEVEL SECURITY can be used\nto disable row-level security for a table, whether policies for the table exist or not.\n",
            "subsections": []
        },
        "PARAMETERS": {
            "content": "IF EXISTS\nDo not throw an error if the policy does not exist. A notice is issued in this case.\n\nname\nThe name of the policy to drop.\n\ntablename\nThe name (optionally schema-qualified) of the table that the policy is on.\n\nCASCADE\nRESTRICT\nThese key words do not have any effect, since there are no dependencies on policies.\n",
            "subsections": []
        },
        "EXAMPLES": {
            "content": "To drop the policy called p1 on the table named mytable:\n\nDROP POLICY p1 ON mytable;\n",
            "subsections": []
        },
        "COMPATIBILITY": {
            "content": "DROP POLICY is a PostgreSQL extension.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "CREATE POLICY (CREATEPOLICY(7)), ALTER POLICY (ALTERPOLICY(7))\n\n\n\nPostgreSQL 14.23                                2026                                  DROP POLICY(7)",
            "subsections": []
        }
    },
    "summary": "DROPPOLICY - remove a row-level security policy from a table",
    "flags": [],
    "examples": [
        "To drop the policy called p1 on the table named mytable:",
        "DROP POLICY p1 ON mytable;"
    ],
    "see_also": [
        {
            "name": "CREATEPOLICY",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/CREATEPOLICY/7/json"
        },
        {
            "name": "ALTERPOLICY",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/ALTERPOLICY/7/json"
        },
        {
            "name": "POLICY",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/POLICY/7/json"
        }
    ]
}