ERROR no plpy.Error defination
BaiShaoqi opened this issue · 1 comments
BaiShaoqi commented
Expected behavior
ERROR: plpy.Error: boom (plpython.c:4960)
CONTEXT: Traceback (most recent call last):
PL/Python function "nested_error_raise", line 10, in <module>
fun3()
PL/Python function "nested_error_raise", line 8, in fun3
fun2()
PL/Python function "nested_error_raise", line 5, in fun2
fun1()
PL/Python function "nested_error_raise", line 2, in fun1
raise plpy.Error("boom")
PL/Python function "nested_error_raise"
Actual behavior
ERROR: PL/Container client exception occurred:
DETAIL:
Exception occurred in Python during function execution
Traceback (most recent call last):
File "<string>", line 13, in nested_error_raise
File "<string>", line 11, in fun3
File "<string>", line 8, in fun2
File "<string>", line 5, in fun1
AttributeError: 'module' object has no attribute 'Error'
Step to reproduce the behavior
CREATE FUNCTION nested_error_raise() RETURNS text
AS $$
# container: plc_python_shared
def fun1():
raise plpy.Error("boom")
def fun2():
fun1()
def fun3():
fun2()
fun3()
return "not reached"
$$ LANGUAGE plcontainer;
SELECT nested_error_raise();