{
    "mode": "info",
    "parameter": "commit",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/info/commit/json",
    "generated": "2026-07-12T12:04:50Z",
    "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\ntransaction become visible to others and are guaranteed to be durable\nif 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\nwith the same transaction characteristics (see SET TRANSACTION\n(SETTRANSACTION(7))) as the just finished one. Otherwise, no new\ntransaction 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\nprovoke a warning message.  COMMIT AND CHAIN when not inside a\ntransaction 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\nTRANSACTION is a PostgreSQL extension.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "BEGIN(7), ROLLBACK(7)\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"
        }
    ]
}