summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/pl/plpython/expected/plpython_subtransaction.out2
-rw-r--r--src/pl/plpython/expected/plpython_subtransaction_0.out9
-rw-r--r--src/pl/plpython/expected/plpython_subtransaction_5.out9
-rw-r--r--src/pl/plpython/sql/plpython_subtransaction.sql2
4 files changed, 14 insertions, 8 deletions
diff --git a/src/pl/plpython/expected/plpython_subtransaction.out b/src/pl/plpython/expected/plpython_subtransaction.out
index d9a830dfcc6..2a3253684f5 100644
--- a/src/pl/plpython/expected/plpython_subtransaction.out
+++ b/src/pl/plpython/expected/plpython_subtransaction.out
@@ -239,7 +239,7 @@ AS $$
try:
with plpy.subtransaction() as s:
s.__exit__(None, None, None)
-except ValueError as e:
+except ValueError, e:
raise ValueError(e)
$$ LANGUAGE plpythonu;
SELECT subtransaction_exit_without_enter();
diff --git a/src/pl/plpython/expected/plpython_subtransaction_0.out b/src/pl/plpython/expected/plpython_subtransaction_0.out
index cc6d9c0e93d..b9abf84f323 100644
--- a/src/pl/plpython/expected/plpython_subtransaction_0.out
+++ b/src/pl/plpython/expected/plpython_subtransaction_0.out
@@ -222,11 +222,14 @@ ERROR: could not compile PL/Python function "subtransaction_enter_subtransactio
DETAIL: SyntaxError: invalid syntax (line 3)
CREATE FUNCTION subtransaction_exit_subtransaction_in_with() RETURNS void
AS $$
-with plpy.subtransaction() as s:
- s.__exit__(None, None, None)
+try:
+ with plpy.subtransaction() as s:
+ s.__exit__(None, None, None)
+except ValueError, e:
+ raise ValueError(e)
$$ LANGUAGE plpythonu;
ERROR: could not compile PL/Python function "subtransaction_exit_subtransaction_in_with"
-DETAIL: SyntaxError: invalid syntax (line 3)
+DETAIL: SyntaxError: invalid syntax (line 4)
SELECT subtransaction_exit_without_enter();
ERROR: ValueError: this subtransaction has not been entered
CONTEXT: Traceback (most recent call last):
diff --git a/src/pl/plpython/expected/plpython_subtransaction_5.out b/src/pl/plpython/expected/plpython_subtransaction_5.out
index c3be1302680..854d763a951 100644
--- a/src/pl/plpython/expected/plpython_subtransaction_5.out
+++ b/src/pl/plpython/expected/plpython_subtransaction_5.out
@@ -222,11 +222,14 @@ ERROR: could not compile PL/Python function "subtransaction_enter_subtransactio
DETAIL: SyntaxError: invalid syntax (<string>, line 3)
CREATE FUNCTION subtransaction_exit_subtransaction_in_with() RETURNS void
AS $$
-with plpy.subtransaction() as s:
- s.__exit__(None, None, None)
+try:
+ with plpy.subtransaction() as s:
+ s.__exit__(None, None, None)
+except ValueError, e:
+ raise ValueError(e)
$$ LANGUAGE plpythonu;
ERROR: could not compile PL/Python function "subtransaction_exit_subtransaction_in_with"
-DETAIL: SyntaxError: invalid syntax (<string>, line 3)
+DETAIL: SyntaxError: invalid syntax (<string>, line 4)
SELECT subtransaction_exit_without_enter();
ERROR: ValueError: this subtransaction has not been entered
CONTEXT: Traceback (most recent call last):
diff --git a/src/pl/plpython/sql/plpython_subtransaction.sql b/src/pl/plpython/sql/plpython_subtransaction.sql
index 572930f8bf2..ebd3c6e4167 100644
--- a/src/pl/plpython/sql/plpython_subtransaction.sql
+++ b/src/pl/plpython/sql/plpython_subtransaction.sql
@@ -161,7 +161,7 @@ AS $$
try:
with plpy.subtransaction() as s:
s.__exit__(None, None, None)
-except ValueError as e:
+except ValueError, e:
raise ValueError(e)
$$ LANGUAGE plpythonu;