# HG changeset patch # User wenzelm # Date 1689528610 -7200 # Node ID fda3f7a158b952313dd12eed7d40141e1e3bdaa2 # Parent ba71ea02d9651562323ab74ee0b2e69cb0567150 make double-sure that this is a transaction context, notably for LOCK TABLE; diff -r ba71ea02d965 -r fda3f7a158b9 src/Pure/General/sql.scala --- a/src/Pure/General/sql.scala Sun Jul 16 19:13:08 2023 +0200 +++ b/src/Pure/General/sql.scala Sun Jul 16 19:30:10 2023 +0200 @@ -734,6 +734,10 @@ 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