What you write about psql sending a COMMIT statement after each statement is wrong. It may be true for other database systems. PostgreSQL as a server commits each statement automatically unless the client has started a transaction with BEGIN or START TRANSACTION statements. This can be proved easily by not using psql as a client, but some programming language. Regards, Holger
RDBMS, in order to be ACID compliant, deals with transactions, not with single statements. It is the client who starts transaction, not the database. It is also the client who sends commit. And yes, I am also using Python which allows me to set autocommit property:
ttps://www.psycopg.org/docs/connection.html#connection.autocommit
If I set autocommit connection property to True, each
cursor.execute will send a commit. Autocommit cannot be set or
disabled on the database level because the database deals with
transactions. The point where the transaction is started and
finished is the client. That is so for MySQL, that is so for
Oracle and that is so for Postgres.BTW, speaking of Python, has
anybody here tried Psycopg3? I know it was released but I am not
sure whether it's stable enough to use in production?
-- Mladen Gogala Database Consultant Tel: (347) 321-1217 https://dbwhisperer.wordpress.com