{
    "content": [
        {
            "type": "text",
            "text": "# DROP_TABLESPACE (man)\n\n## NAME\n\nDROPTABLESPACE - remove a tablespace\n\n## SYNOPSIS\n\nDROP TABLESPACE [ IF EXISTS ] name\n\n## DESCRIPTION\n\nDROP TABLESPACE removes a tablespace from the system.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **PARAMETERS**\n- **NOTES**\n- **EXAMPLES**\n- **COMPATIBILITY**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "DROP_TABLESPACE",
        "section": "",
        "mode": "man",
        "summary": "DROPTABLESPACE - remove a tablespace",
        "synopsis": "DROP TABLESPACE [ IF EXISTS ] name",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [
            "To remove tablespace mystuff from the system:",
            "DROP TABLESPACE mystuff;"
        ],
        "see_also": [
            {
                "name": "CREATETABLESPACE",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/CREATETABLESPACE/7/json"
            },
            {
                "name": "ALTERTABLESPACE",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/ALTERTABLESPACE/7/json"
            },
            {
                "name": "TABLESPACE",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/TABLESPACE/7/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "PARAMETERS",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "NOTES",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "COMPATIBILITY",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "DROPTABLESPACE - remove a tablespace\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "DROP TABLESPACE [ IF EXISTS ] name\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "DROP TABLESPACE removes a tablespace from the system.\n\nA tablespace can only be dropped by its owner or a superuser. The tablespace must be empty of\nall database objects before it can be dropped. It is possible that objects in other databases\nmight still reside in the tablespace even if no objects in the current database are using the\ntablespace. Also, if the tablespace is listed in the temptablespaces setting of any active\nsession, the DROP might fail due to temporary files residing in the tablespace.\n",
                "subsections": []
            },
            "PARAMETERS": {
                "content": "IF EXISTS\nDo not throw an error if the tablespace does not exist. A notice is issued in this case.\n\nname\nThe name of a tablespace.\n",
                "subsections": []
            },
            "NOTES": {
                "content": "DROP TABLESPACE cannot be executed inside a transaction block.\n",
                "subsections": []
            },
            "EXAMPLES": {
                "content": "To remove tablespace mystuff from the system:\n\nDROP TABLESPACE mystuff;\n",
                "subsections": []
            },
            "COMPATIBILITY": {
                "content": "DROP TABLESPACE is a PostgreSQL extension.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "CREATE TABLESPACE (CREATETABLESPACE(7)), ALTER TABLESPACE (ALTERTABLESPACE(7))\n\n\n\nPostgreSQL 14.23                                2026                              DROP TABLESPACE(7)",
                "subsections": []
            }
        }
    }
}