Affects Version/s: None
Fix Version/s: None
When insert! is run outside of transaction it is not commited when running on Postgres.
Insert! should by default automatically run the commands in transactions.
This problem is probably not seen in current tests as default test databases automatically commit single commands.
I'm yet to reproduce this using unit tests due to
JDBC-127, but I can reproduce this in a application.
In 0.5.5 (https://github.com/clojure/java.jdbc/commit/310781429225b614cab01256f3adce54917644aa) extract-transaction? was removed and default :transaction? value was moved to insert!. Later, in 0.5.6 (https://github.com/clojure/java.jdbc/commit/1928ff4d627243c9d2e0bf309a8b4f965f5034d3) insert! was rewriten. :transaction? check was moved to insert-cols! and insert-rows! but the default value was lost.
I attached a patch that adds the default value to insert-cols! and insert-rows. But I think it would be a good idea to wait until test issues (
JDBC-127) have been fixed before merging this, so that this problem and solution can be validated using tests.