{
    "mode": "man",
    "parameter": "COMMIT",
    "section": "7",
    "url": "https://www.chedong.com/phpMan.php/man/COMMIT/7/json",
    "generated": "2026-05-30T06:05:27Z",
    "synopsis": "COMMIT [ WORK | TRANSACTION ] [ AND [ NO ] CHAIN ]",
    "sections": {
        "NAME": {
            "content": "COMMIT - commit the current transaction\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "COMMIT [ WORK | TRANSACTION ] [ AND [ NO ] CHAIN ]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "COMMIT commits the current transaction. All changes made by the transaction become visible to\nothers and are guaranteed to be durable if a crash occurs.\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 (SETTRANSACTION(7))) as the just\nfinished one. Otherwise, no new transaction is started.\n",
            "subsections": []
        },
        "NOTES": {
            "content": "Use ROLLBACK(7) to abort a transaction.\n\nIssuing COMMIT when not inside a transaction does no harm, but it will provoke a warning\nmessage.  COMMIT AND CHAIN when not inside a transaction is an error.\n",
            "subsections": []
        },
        "EXAMPLES": {
            "content": "To commit the current transaction and make all changes permanent:\n\nCOMMIT;\n",
            "subsections": []
        },
        "COMPATIBILITY": {
            "content": "The command COMMIT conforms to the SQL standard. The form COMMIT TRANSACTION is a PostgreSQL\nextension.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "BEGIN(7), ROLLBACK(7)\n\n\n\nPostgreSQL 14.23                                2026                                       COMMIT(7)",
            "subsections": []
        }
    },
    "summary": "COMMIT - commit the current transaction",
    "flags": [],
    "examples": [
        "To commit the current transaction and make all changes permanent:",
        "COMMIT;"
    ],
    "see_also": [
        {
            "name": "BEGIN",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/BEGIN/7/json"
        },
        {
            "name": "ROLLBACK",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/ROLLBACK/7/json"
        }
    ]
}