src/Pure/General/sql.scala
changeset 78386 ee588c4b5557
parent 78384 6b6a3e7a0d32
child 78389 41e8ae87184d
--- 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