{
    "mode": "man",
    "parameter": "ABORT",
    "section": "7",
    "url": "https://www.chedong.com/phpMan.php/man/ABORT/7/json",
    "generated": "2026-06-16T07:42:13Z",
    "synopsis": "ABORT [ WORK | TRANSACTION ] [ AND [ NO ] CHAIN ]",
    "sections": {
        "NAME": {
            "content": "ABORT - abort the current transaction\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "ABORT [ WORK | TRANSACTION ] [ AND [ NO ] CHAIN ]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "ABORT rolls back the current transaction and causes all the updates made by the transaction\nto be discarded. This command is identical in behavior to the standard SQL command ROLLBACK,\nand is present only for historical reasons.\n",
            "subsections": []
        },
        "PARAMETERS": {
            "content": "WORK\nTRANSACTION\nOptional key words. They have no effect.\n\nAND CHAIN\nIf AND CHAIN is specified, a new transaction is immediately started with the same\ntransaction characteristics (see SET TRANSACTION) as the just finished one. Otherwise, no\nnew transaction is started.\n",
            "subsections": []
        },
        "NOTES": {
            "content": "Use COMMIT to successfully terminate a transaction.\n\nIssuing ABORT outside of a transaction block emits a warning and otherwise has no effect.\n",
            "subsections": []
        },
        "EXAMPLES": {
            "content": "To abort all changes:\n\nABORT;\n",
            "subsections": []
        },
        "COMPATIBILITY": {
            "content": "This command is a PostgreSQL extension present for historical reasons.  ROLLBACK is the\nequivalent standard SQL command.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "BEGIN(7), COMMIT(7), ROLLBACK(7)\n\n\n\nPostgreSQL 14.23                                2026                                        ABORT(7)",
            "subsections": []
        }
    },
    "summary": "ABORT - abort the current transaction",
    "flags": [],
    "examples": [
        "To abort all changes:",
        "ABORT;"
    ],
    "see_also": [
        {
            "name": "BEGIN",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/BEGIN/7/json"
        },
        {
            "name": "COMMIT",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/COMMIT/7/json"
        },
        {
            "name": "ROLLBACK",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/ROLLBACK/7/json"
        }
    ]
}