From 27c405d61a909d11ded22ed0ac8038810e3f36e9 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 25 Aug 2009 12:44:59 +0000 Subject: 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. --- src/pl/plpython/expected/plpython_unicode.out | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/pl/plpython/expected/plpython_unicode.out') diff --git a/src/pl/plpython/expected/plpython_unicode.out b/src/pl/plpython/expected/plpython_unicode.out index ce19eb980c..d3b6fd1db7 100644 --- a/src/pl/plpython/expected/plpython_unicode.out +++ b/src/pl/plpython/expected/plpython_unicode.out @@ -24,13 +24,15 @@ rv = plpy.execute(plan, u"\\x80", 1) return rv[0]["testvalue1"] ' LANGUAGE plpythonu; SELECT unicode_return_error(); -ERROR: PL/Python: could not create string representation of Python object, while creating return value +ERROR: PL/Python: could not create string representation of Python object DETAIL: : 'ascii' codec can't encode character u'\x80' in position 0: ordinal not in range(128) -CONTEXT: PL/Python function "unicode_return_error" +CONTEXT: while creating return value +PL/Python function "unicode_return_error" INSERT INTO unicode_test (testvalue) VALUES ('test'); -ERROR: PL/Python: could not compute string representation of Python object, while modifying trigger row +ERROR: PL/Python: could not create string representation of Python object DETAIL: : 'ascii' codec can't encode character u'\x80' in position 0: ordinal not in range(128) -CONTEXT: PL/Python function "unicode_trigger_error" +CONTEXT: while modifying trigger row +PL/Python function "unicode_trigger_error" SELECT unicode_plan_error1(); WARNING: PL/Python: : unrecognized error in PLy_spi_execute_plan CONTEXT: PL/Python function "unicode_plan_error1" -- cgit v1.2.1