mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-09 13:27:39 +08:00
PL/Python DO handler
Also cleaned up some redundancies between the primary error messages and the error context in PL/Python. Hannu Valtonen
This commit is contained in:
6
src/pl/plpython/expected/plpython_do.out
Normal file
6
src/pl/plpython/expected/plpython_do.out
Normal file
@ -0,0 +1,6 @@
|
||||
DO $$ plpy.notice("This is plpythonu.") $$ LANGUAGE plpythonu;
|
||||
NOTICE: This is plpythonu.
|
||||
CONTEXT: PL/Python anonymous code block
|
||||
DO $$ nonsense $$ LANGUAGE plpythonu;
|
||||
ERROR: PL/Python: NameError: global name 'nonsense' is not defined
|
||||
CONTEXT: PL/Python anonymous code block
|
||||
@ -22,8 +22,7 @@ CREATE FUNCTION exception_index_invalid(text) RETURNS text
|
||||
'return args[1]'
|
||||
LANGUAGE plpythonu;
|
||||
SELECT exception_index_invalid('test');
|
||||
ERROR: PL/Python: PL/Python function "exception_index_invalid" failed
|
||||
DETAIL: IndexError: list index out of range
|
||||
ERROR: PL/Python: IndexError: list index out of range
|
||||
CONTEXT: PL/Python function "exception_index_invalid"
|
||||
/* check handling of nested exceptions
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user