mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-18 20:36:58 +08:00
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:
@ -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
|
||||
------------------+---------
|
||||
|
||||
Reference in New Issue
Block a user