diff --git a/src/pl/plpython/expected/plpython_transaction.out b/src/pl/plpython/expected/plpython_transaction.out index 1fadc69b636..6f6dfadf9c3 100644 --- a/src/pl/plpython/expected/plpython_transaction.out +++ b/src/pl/plpython/expected/plpython_transaction.out @@ -95,8 +95,9 @@ CONTEXT: Traceback (most recent call last): PL/Python function "transaction_test4" -- commit inside subtransaction (prohibited) DO LANGUAGE plpythonu $$ -with plpy.subtransaction(): - plpy.commit() +s = plpy.subtransaction() +s.enter() +plpy.commit() $$; WARNING: forcibly aborting a subtransaction that has not been exited ERROR: cannot commit while a subtransaction is active diff --git a/src/pl/plpython/sql/plpython_transaction.sql b/src/pl/plpython/sql/plpython_transaction.sql index 36c7b2ef385..b337d4e3006 100644 --- a/src/pl/plpython/sql/plpython_transaction.sql +++ b/src/pl/plpython/sql/plpython_transaction.sql @@ -79,8 +79,9 @@ SELECT transaction_test4(); -- commit inside subtransaction (prohibited) DO LANGUAGE plpythonu $$ -with plpy.subtransaction(): - plpy.commit() +s = plpy.subtransaction() +s.enter() +plpy.commit() $$;