mirror of
https://github.com/postgres/postgres.git
synced 2025-04-29 13:56:47 +03:00
Update plpython_subtransaction alternative expected files
The original patch only targeted Python 2.6 and newer, since that is what we have supported in PostgreSQL 13 and newer. For older branches, we need to fix it up for older Python versions.
This commit is contained in:
parent
009ee51af7
commit
ec52b886d1
@ -239,7 +239,7 @@ AS $$
|
|||||||
try:
|
try:
|
||||||
with plpy.subtransaction() as s:
|
with plpy.subtransaction() as s:
|
||||||
s.__exit__(None, None, None)
|
s.__exit__(None, None, None)
|
||||||
except ValueError as e:
|
except ValueError, e:
|
||||||
raise ValueError(e)
|
raise ValueError(e)
|
||||||
$$ LANGUAGE plpythonu;
|
$$ LANGUAGE plpythonu;
|
||||||
SELECT subtransaction_exit_without_enter();
|
SELECT subtransaction_exit_without_enter();
|
||||||
|
@ -222,11 +222,14 @@ ERROR: could not compile PL/Python function "subtransaction_enter_subtransactio
|
|||||||
DETAIL: SyntaxError: invalid syntax (line 3)
|
DETAIL: SyntaxError: invalid syntax (line 3)
|
||||||
CREATE FUNCTION subtransaction_exit_subtransaction_in_with() RETURNS void
|
CREATE FUNCTION subtransaction_exit_subtransaction_in_with() RETURNS void
|
||||||
AS $$
|
AS $$
|
||||||
with plpy.subtransaction() as s:
|
try:
|
||||||
s.__exit__(None, None, None)
|
with plpy.subtransaction() as s:
|
||||||
|
s.__exit__(None, None, None)
|
||||||
|
except ValueError, e:
|
||||||
|
raise ValueError(e)
|
||||||
$$ LANGUAGE plpythonu;
|
$$ LANGUAGE plpythonu;
|
||||||
ERROR: could not compile PL/Python function "subtransaction_exit_subtransaction_in_with"
|
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();
|
SELECT subtransaction_exit_without_enter();
|
||||||
ERROR: ValueError: this subtransaction has not been entered
|
ERROR: ValueError: this subtransaction has not been entered
|
||||||
CONTEXT: Traceback (most recent call last):
|
CONTEXT: Traceback (most recent call last):
|
||||||
|
@ -222,11 +222,14 @@ ERROR: could not compile PL/Python function "subtransaction_enter_subtransactio
|
|||||||
DETAIL: SyntaxError: invalid syntax (<string>, line 3)
|
DETAIL: SyntaxError: invalid syntax (<string>, line 3)
|
||||||
CREATE FUNCTION subtransaction_exit_subtransaction_in_with() RETURNS void
|
CREATE FUNCTION subtransaction_exit_subtransaction_in_with() RETURNS void
|
||||||
AS $$
|
AS $$
|
||||||
with plpy.subtransaction() as s:
|
try:
|
||||||
s.__exit__(None, None, None)
|
with plpy.subtransaction() as s:
|
||||||
|
s.__exit__(None, None, None)
|
||||||
|
except ValueError, e:
|
||||||
|
raise ValueError(e)
|
||||||
$$ LANGUAGE plpythonu;
|
$$ LANGUAGE plpythonu;
|
||||||
ERROR: could not compile PL/Python function "subtransaction_exit_subtransaction_in_with"
|
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();
|
SELECT subtransaction_exit_without_enter();
|
||||||
ERROR: ValueError: this subtransaction has not been entered
|
ERROR: ValueError: this subtransaction has not been entered
|
||||||
CONTEXT: Traceback (most recent call last):
|
CONTEXT: Traceback (most recent call last):
|
||||||
|
@ -161,7 +161,7 @@ AS $$
|
|||||||
try:
|
try:
|
||||||
with plpy.subtransaction() as s:
|
with plpy.subtransaction() as s:
|
||||||
s.__exit__(None, None, None)
|
s.__exit__(None, None, None)
|
||||||
except ValueError as e:
|
except ValueError, e:
|
||||||
raise ValueError(e)
|
raise ValueError(e)
|
||||||
$$ LANGUAGE plpythonu;
|
$$ LANGUAGE plpythonu;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user