ERROR nested error not work as expected
BaiShaoqi opened this issue · 2 comments
BaiShaoqi commented
Expected behavior
ERROR: plpy.Error: boom (plpython.c:4960)
CONTEXT: Traceback (most recent call last):
PL/Python function "nested_error", line 11, in <module>
fun3()
PL/Python function "nested_error", line 9, in fun3
fun2()
PL/Python function "nested_error", line 5, in fun2
fun1()
PL/Python function "nested_error", line 2, in fun1
plpy.error("boom")
PL/Python function "nested_error"
Actual behavior
ERROR: boom
Step to reproduce the behavior
CREATE FUNCTION nested_error() RETURNS text AS $$
# container: plc_python_shared
def fun1():
plpy.error("boom")
def fun2():
fun1()
def fun3():
fun2()
fun3()
return "not reached"
$$ LANGUAGE plcontainer;
SELECT nested_error();