ebdb42a_regression.diffs
text/x-diff
Filename: ebdb42a_regression.diffs
Type: text/x-diff
Part: 0
Patch
Format: context
| File | + | − |
|---|---|---|
| /home/buildfarm/mpolyakova/postgrespro_core_353_stable_func/src/pl/plpython/results/plpython_drop.out | 1 | 6 |
| /home/buildfarm/mpolyakova/postgrespro_core_353_stable_func/src/pl/plpython/results/plpython_transaction.out | 4 | 46 |
*** /home/buildfarm/mpolyakova/postgrespro_core_353_stable_func/src/pl/plpython/expected/plpython_transaction.out Tue Feb 13 13:00:33 2018
--- /home/buildfarm/mpolyakova/postgrespro_core_353_stable_func/src/pl/plpython/results/plpython_transaction.out Tue Feb 13 13:34:39 2018
***************
*** 88,136 ****
return 1
$$;
SELECT transaction_test4();
! ERROR: spiexceptions.InvalidTransactionTermination: invalid transaction termination
! CONTEXT: Traceback (most recent call last):
! PL/Python function "transaction_test4", line 2, in <module>
! plpy.execute("DO LANGUAGE plpythonu $x$ plpy.commit() $x$")
! PL/Python function "transaction_test4"
! -- commit inside subtransaction (prohibited)
! DO LANGUAGE plpythonu $$
! 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
! CONTEXT: PL/Python anonymous code block
! -- commit inside cursor loop
! CREATE TABLE test2 (x int);
! INSERT INTO test2 VALUES (0), (1), (2), (3), (4);
! TRUNCATE test1;
! DO LANGUAGE plpythonu $$
! for row in plpy.cursor("SELECT * FROM test2 ORDER BY x"):
! plpy.execute("INSERT INTO test1 (a) VALUES (%s)" % row['x'])
! plpy.commit()
! $$;
! ERROR: cannot commit transaction while a cursor is open
! CONTEXT: PL/Python anonymous code block
! SELECT * FROM test1;
! a | b
! ---+---
! (0 rows)
!
! -- rollback inside cursor loop
! TRUNCATE test1;
! DO LANGUAGE plpythonu $$
! for row in plpy.cursor("SELECT * FROM test2 ORDER BY x"):
! plpy.execute("INSERT INTO test1 (a) VALUES (%s)" % row['x'])
! plpy.rollback()
! $$;
! ERROR: cannot abort transaction while a cursor is open
! CONTEXT: PL/Python anonymous code block
! SELECT * FROM test1;
! a | b
! ---+---
! (0 rows)
!
! DROP TABLE test1;
! DROP TABLE test2;
--- 88,94 ----
return 1
$$;
SELECT transaction_test4();
! server closed the connection unexpectedly
! This probably means the server terminated abnormally
! before or while processing the request.
! connection to server was lost
======================================================================
*** /home/buildfarm/mpolyakova/postgrespro_core_353_stable_func/src/pl/plpython/expected/plpython_drop.out Wed Feb 7 17:27:50 2018
--- /home/buildfarm/mpolyakova/postgrespro_core_353_stable_func/src/pl/plpython/results/plpython_drop.out Tue Feb 13 13:34:39 2018
***************
*** 1,6 ****
! --
! -- For paranoia's sake, don't leave an untrusted language sitting around
! --
! SET client_min_messages = WARNING;
! DROP EXTENSION plpythonu CASCADE;
! DROP EXTENSION IF EXISTS plpython2u CASCADE;
--- 1 ----
! psql: FATAL: the database system is in recovery mode
======================================================================