From: branch-fixup Date: Tue, 21 Nov 2006 21:51:05 +0000 (+0000) Subject: Add files from parent branch HEAD: X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=0698a786e1a80652f03e22472c2c5e304ba14b5d;p=users%2Fbernd%2Fpostgres.git Add files from parent branch HEAD: src/pl/plpython/expected/plpython_error_3.out --- diff --git a/src/pl/plpython/expected/plpython_error_3.out b/src/pl/plpython/expected/plpython_error_3.out new file mode 100644 index 0000000000..3cde9bf6ac --- /dev/null +++ b/src/pl/plpython/expected/plpython_error_3.out @@ -0,0 +1,38 @@ +-- test error handling, i forgot to restore Warn_restart in +-- the trigger handler once. the errors and subsequent core dump were +-- interesting. +SELECT invalid_type_uncaught('rick'); +WARNING: plpython: in function invalid_type_uncaught: +DETAIL: : Unknown error in PLy_spi_prepare +ERROR: type "test" does not exist +SELECT invalid_type_caught('rick'); +WARNING: plpython: in function invalid_type_caught: +DETAIL: : Unknown error in PLy_spi_prepare +ERROR: type "test" does not exist +SELECT invalid_type_reraised('rick'); +WARNING: plpython: in function invalid_type_reraised: +DETAIL: : Unknown error in PLy_spi_prepare +ERROR: type "test" does not exist +SELECT valid_type('rick'); + valid_type +------------ + +(1 row) + +-- +-- Test Unicode error handling. +-- +SELECT unicode_return_error(); +ERROR: plpython: function "unicode_return_error" could not create return value +DETAIL: : 'ascii' codec can't encode character u'\x80' in position 0: ordinal not in range(128) +INSERT INTO unicode_test (testvalue) VALUES ('test'); +ERROR: plpython: function "unicode_trigger_error" could not modify tuple +DETAIL: : 'ascii' codec can't encode character u'\x80' in position 0: ordinal not in range(128) +SELECT unicode_plan_error1(); +WARNING: plpython: in function unicode_plan_error1: +DETAIL: : Unknown error in PLy_spi_execute_plan +ERROR: plpython: function "unicode_plan_error1" could not execute plan +DETAIL: : 'ascii' codec can't encode character u'\x80' in position 0: ordinal not in range(128) +SELECT unicode_plan_error2(); +ERROR: plpython: function "unicode_plan_error2" could not execute plan +DETAIL: : 'ascii' codec can't encode character u'\x80' in position 0: ordinal not in range(128)