Updated on 2023-10-23 GMT+08:00

connection.commit()

Function

This method commits the currently pending transaction to the database.

By default, Psycopg opens a transaction before executing the first command. If commit() is not called, the effect of any data operation will be lost.

Prototype

connection.commit()

Parameter

None

Return Value

None

Example

For details, see Example: Common Operations.