Enhanced error context support in PL/Python

Extract the "while creating return value" and "while modifying trigger
row" parts of some error messages into another layer of error context.
This will simplify the upcoming patch to improve data type support, but
it can stand on its own.
This commit is contained in:
Peter Eisentraut
2009-08-25 12:44:59 +00:00
parent 983d10833e
commit 27c405d61a
8 changed files with 71 additions and 26 deletions

View File

@ -20,7 +20,8 @@ SELECT test_void_func1(), test_void_func1() IS NULL AS "is null";
SELECT test_void_func2(); -- should fail
ERROR: PL/Python function with return type "void" did not return None
CONTEXT: PL/Python function "test_void_func2"
CONTEXT: while creating return value
PL/Python function "test_void_func2"
SELECT test_return_none(), test_return_none() IS NULL AS "is null";
test_return_none | is null
------------------+---------