aboutsummaryrefslogtreecommitdiff
path: root/src/pl/plpython/sql/plpython_subtransaction.sql
diff options
context:
space:
mode:
Diffstat (limited to 'src/pl/plpython/sql/plpython_subtransaction.sql')
-rw-r--r--src/pl/plpython/sql/plpython_subtransaction.sql4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pl/plpython/sql/plpython_subtransaction.sql b/src/pl/plpython/sql/plpython_subtransaction.sql
index 9ad6377c7cd..3c188e3dd2d 100644
--- a/src/pl/plpython/sql/plpython_subtransaction.sql
+++ b/src/pl/plpython/sql/plpython_subtransaction.sql
@@ -23,7 +23,7 @@ try:
if what_error == "SPI":
plpy.execute("INSERT INTO subtransaction_tbl VALUES ('oops')")
elif what_error == "Python":
- plpy.attribute_error
+ raise Exception("Python exception")
except:
exc = False
subxact.__exit__(*sys.exc_info())
@@ -53,7 +53,7 @@ with plpy.subtransaction():
if what_error == "SPI":
plpy.execute("INSERT INTO subtransaction_tbl VALUES ('oops')")
elif what_error == "Python":
- plpy.attribute_error
+ raise Exception("Python exception")
$$ LANGUAGE plpythonu;
SELECT subtransaction_ctx_test();