I've just set up a new PostgreSQL 9.5.2, and it seems that all my transactions are auto committed.
Running the following SQL:
CREATE TABLE test (id NUMERIC PRIMARY KEY);
INSERT INTO test (id) VALUES (1);
ROLLBACK;
results in a warning:
WARNING: there is no transaction in progress
ROLLBACK
on a different transaction, the following query:
SELECT * FROM test;
actually returns the row with 1
(as if the insert was committed).
I tried to set autocommit
off, but it seems that this feature no longer exists (I get the unrecognized configuration parameter
error).
What the hell is going on here?