{
    "content": [
        {
            "type": "text",
            "text": "# DROP_POLICY (man)\n\n## NAME\n\nDROPPOLICY - remove a row-level security policy from a table\n\n## SYNOPSIS\n\nDROP POLICY [ IF EXISTS ] name ON tablename [ CASCADE | RESTRICT ]\n\n## DESCRIPTION\n\nDROP 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\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": "DROP_POLICY",
        "section": "",
        "mode": "man",
        "summary": "DROPPOLICY - remove a row-level security policy from a table",
        "synopsis": "DROP POLICY [ IF EXISTS ] name ON tablename [ CASCADE | RESTRICT ]",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "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"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "PARAMETERS",
                "lines": 13,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "COMPATIBILITY",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            }
        ],
        "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": []
            }
        }
    }
}