All Products
Search
Document Center

PolarDB:END

Last Updated:Mar 28, 2026

END commits the current transaction, making all changes visible to other sessions and durable against crashes. It is a PostgreSQL extension equivalent to COMMIT.

Synopsis

END [ WORK | TRANSACTION ] [ AND [ NO ] CHAIN ]

Parameters

ParameterDescription
WORK | TRANSACTIONOptional keywords with no effect.
AND CHAINImmediately starts a new transaction with the same transaction characteristics as the one just committed. See SET TRANSACTION for details.
AND NO CHAINDoes not start a new transaction after committing. This is the default behavior when neither AND CHAIN nor AND NO CHAIN is specified.

Usage notes

  • To abort a transaction instead of committing it, use ROLLBACK.

  • Issuing END outside an active transaction does no harm but generates a warning.

Examples

Commit the current transaction and make all changes permanent:

END;

Compatibility

END is a PostgreSQL extension. The SQL standard equivalent is COMMIT.

What's next