mirror of
https://github.com/postgres/postgres.git
synced 2025-12-12 02:37:31 +03:00
PL/Python: Fix tests for older Python versions
Commit 8561e4840c neglected to handle
older Python versions that don't support the "with" statement. So write
the tests in a way that older versions can handle as well.
This commit is contained in:
@@ -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()
|
||||
$$;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user