more elementary transaction implementation (despite fda3f7a158b9 and 9da65bc75610);
--- a/src/Pure/General/sql.scala Mon Jul 17 20:59:50 2023 +0200
+++ b/src/Pure/General/sql.scala Mon Jul 17 21:35:27 2023 +0200
@@ -442,13 +442,12 @@
require(connection.getAutoCommit(), "transaction already active")
try {
connection.setAutoCommit(false)
- val savepoint = connection.setSavepoint()
try {
val result = body
connection.commit()
result
}
- catch { case exn: Throwable => connection.rollback(savepoint); throw exn }
+ catch { case exn: Throwable => connection.rollback(); throw exn }
}
finally { connection.setAutoCommit(true) }
}
@@ -749,10 +748,6 @@
override def lock_tables(tables: List[SQL.Table]): PostgreSQL.Source =
if_proper(tables, "LOCK TABLE " + tables.mkString(", ") + " IN ACCESS EXCLUSIVE MODE")
- override def transaction[A](body: => A): A = super.transaction {
- execute_statement("START TRANSACTION")
- body
- }
/* notifications: IPC via database server */
// see https://www.postgresql.org/docs/current/sql-notify.html