diff options
| author | Andres Freund <andres@anarazel.de> | 2022-03-07 18:19:56 -0800 |
|---|---|---|
| committer | Andres Freund <andres@anarazel.de> | 2022-03-07 18:20:51 -0800 |
| commit | db23464715f4792298c639153dda7bfd9ad9d602 (patch) | |
| tree | 57db9275a7ea3b84fab2d8c65153710e9465465a /src/pl/plpython/expected/plpython_subtransaction.out | |
| parent | 76a29adee749f41e277459cbf2e47a2ff7777f31 (diff) | |
plpython: Remove regression test infrastructure for Python 2.
Since 19252e8ec93 we reject Python 2 during build configuration. Now that the
dust on the buildfarm has settled, remove regression testing infrastructure
dealing with differing output between Python 2 / 3.
Reviewed-By: Peter Eisentraut <peter@eisentraut.org>
Reviewed-By: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/20211031184548.g4sxfe47n2kyi55r@alap3.anarazel.de
Diffstat (limited to 'src/pl/plpython/expected/plpython_subtransaction.out')
| -rw-r--r-- | src/pl/plpython/expected/plpython_subtransaction.out | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/pl/plpython/expected/plpython_subtransaction.out b/src/pl/plpython/expected/plpython_subtransaction.out index 2a56541917d..43d9277a33b 100644 --- a/src/pl/plpython/expected/plpython_subtransaction.out +++ b/src/pl/plpython/expected/plpython_subtransaction.out @@ -14,7 +14,7 @@ with plpy.subtransaction(): plpy.execute("INSERT INTO subtransaction_tbl VALUES ('oops')") elif what_error == "Python": raise Exception("Python exception") -$$ LANGUAGE plpythonu; +$$ LANGUAGE plpython3u; SELECT subtransaction_ctx_test(); subtransaction_ctx_test ------------------------- @@ -71,7 +71,7 @@ with plpy.subtransaction(): raise plpy.notice("Swallowed %s(%r)" % (e.__class__.__name__, e.args[0])) return "ok" -$$ LANGUAGE plpythonu; +$$ LANGUAGE plpython3u; SELECT subtransaction_nested_test(); ERROR: spiexceptions.SyntaxError: syntax error at or near "error" LINE 1: error @@ -111,7 +111,7 @@ with plpy.subtransaction(): plpy.execute("INSERT INTO subtransaction_tbl VALUES (2)") plpy.execute("SELECT subtransaction_nested_test('t')") return "ok" -$$ LANGUAGE plpythonu; +$$ LANGUAGE plpython3u; SELECT subtransaction_deeply_nested_test(); NOTICE: Swallowed SyntaxError('syntax error at or near "error"') subtransaction_deeply_nested_test @@ -133,42 +133,42 @@ TRUNCATE subtransaction_tbl; CREATE FUNCTION subtransaction_exit_without_enter() RETURNS void AS $$ plpy.subtransaction().__exit__(None, None, None) -$$ LANGUAGE plpythonu; +$$ LANGUAGE plpython3u; CREATE FUNCTION subtransaction_enter_without_exit() RETURNS void AS $$ plpy.subtransaction().__enter__() -$$ LANGUAGE plpythonu; +$$ LANGUAGE plpython3u; CREATE FUNCTION subtransaction_exit_twice() RETURNS void AS $$ plpy.subtransaction().__enter__() plpy.subtransaction().__exit__(None, None, None) plpy.subtransaction().__exit__(None, None, None) -$$ LANGUAGE plpythonu; +$$ LANGUAGE plpython3u; CREATE FUNCTION subtransaction_enter_twice() RETURNS void AS $$ plpy.subtransaction().__enter__() plpy.subtransaction().__enter__() -$$ LANGUAGE plpythonu; +$$ LANGUAGE plpython3u; CREATE FUNCTION subtransaction_exit_same_subtransaction_twice() RETURNS void AS $$ s = plpy.subtransaction() s.__enter__() s.__exit__(None, None, None) s.__exit__(None, None, None) -$$ LANGUAGE plpythonu; +$$ LANGUAGE plpython3u; CREATE FUNCTION subtransaction_enter_same_subtransaction_twice() RETURNS void AS $$ s = plpy.subtransaction() s.__enter__() s.__enter__() s.__exit__(None, None, None) -$$ LANGUAGE plpythonu; +$$ LANGUAGE plpython3u; -- No warnings here, as the subtransaction gets indeed closed CREATE FUNCTION subtransaction_enter_subtransaction_in_with() RETURNS void AS $$ with plpy.subtransaction() as s: s.__enter__() -$$ LANGUAGE plpythonu; +$$ LANGUAGE plpython3u; CREATE FUNCTION subtransaction_exit_subtransaction_in_with() RETURNS void AS $$ try: @@ -176,7 +176,7 @@ try: s.__exit__(None, None, None) except ValueError as e: raise ValueError(e) -$$ LANGUAGE plpythonu; +$$ LANGUAGE plpython3u; SELECT subtransaction_exit_without_enter(); ERROR: ValueError: this subtransaction has not been entered CONTEXT: Traceback (most recent call last): @@ -255,7 +255,7 @@ try: plpy.execute(p, ["wrong"]) except plpy.SPIError: plpy.warning("Caught a SPI error") -$$ LANGUAGE plpythonu; +$$ LANGUAGE plpython3u; SELECT subtransaction_mix_explicit_and_implicit(); WARNING: Caught a SPI error from an explicit subtransaction WARNING: Caught a SPI error @@ -278,7 +278,7 @@ AS $$ s = plpy.subtransaction() s.enter() s.exit(None, None, None) -$$ LANGUAGE plpythonu; +$$ LANGUAGE plpython3u; SELECT subtransaction_alternative_names(); subtransaction_alternative_names ---------------------------------- @@ -294,7 +294,7 @@ with plpy.subtransaction(): plpy.execute("INSERT INTO subtransaction_tbl VALUES ('a')") except plpy.SPIError: plpy.notice("caught") -$$ LANGUAGE plpythonu; +$$ LANGUAGE plpython3u; SELECT try_catch_inside_subtransaction(); NOTICE: caught try_catch_inside_subtransaction @@ -318,7 +318,7 @@ with plpy.subtransaction(): plpy.execute("INSERT INTO subtransaction_tbl VALUES (1)") except plpy.SPIError: plpy.notice("caught") -$$ LANGUAGE plpythonu; +$$ LANGUAGE plpython3u; SELECT pk_violation_inside_subtransaction(); NOTICE: caught pk_violation_inside_subtransaction @@ -340,7 +340,7 @@ with plpy.subtransaction(): cur.fetch(10) fetched = cur.fetch(10); return int(fetched[5]["i"]) -$$ LANGUAGE plpythonu; +$$ LANGUAGE plpython3u; CREATE FUNCTION cursor_aborted_subxact() RETURNS int AS $$ try: with plpy.subtransaction(): @@ -351,7 +351,7 @@ except plpy.SPIError: fetched = cur.fetch(10) return int(fetched[5]["i"]) return 0 # not reached -$$ LANGUAGE plpythonu; +$$ LANGUAGE plpython3u; CREATE FUNCTION cursor_plan_aborted_subxact() RETURNS int AS $$ try: with plpy.subtransaction(): @@ -364,7 +364,7 @@ except plpy.SPIError: fetched = cur.fetch(5) return fetched[2]["i"] return 0 # not reached -$$ LANGUAGE plpythonu; +$$ LANGUAGE plpython3u; CREATE FUNCTION cursor_close_aborted_subxact() RETURNS boolean AS $$ try: with plpy.subtransaction(): @@ -374,7 +374,7 @@ except plpy.SPIError: cur.close() return True return False # not reached -$$ LANGUAGE plpythonu; +$$ LANGUAGE plpython3u; SELECT cursor_in_subxact(); cursor_in_subxact ------------------- |
