aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-07-24 14:53:42 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-07-24 14:53:42 +0000
commita8a3c3c4d69818955bcad7534b6379e2404a41b0 (patch)
treeb57fb543419c11d58ceabdb7069a6e90aebeb35f /src
parent8b60f8e6c938e9bf2f6fce489679cbac07110da4 (diff)
downloadpostgresql-a8a3c3c4d69818955bcad7534b6379e2404a41b0.tar.gz
postgresql-a8a3c3c4d69818955bcad7534b6379e2404a41b0.zip
Add variant expected file to cope with different spelling of a Python
error message in Python 2.3 and before. Per Michael Fuhr and buildfarm results.
Diffstat (limited to 'src')
-rw-r--r--src/pl/plpython/expected/plpython_error_1.out38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/pl/plpython/expected/plpython_error_1.out b/src/pl/plpython/expected/plpython_error_1.out
new file mode 100644
index 00000000000..7b1e58797f2
--- /dev/null
+++ b/src/pl/plpython/expected/plpython_error_1.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: plpy.SPIError: 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: plpy.SPIError: 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: plpy.SPIError: 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: exceptions.UnicodeEncodeError: 'ascii' codec can't encode character '\u80' 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: exceptions.UnicodeEncodeError: 'ascii' codec can't encode character '\u80' in position 0: ordinal not in range(128)
+SELECT unicode_plan_error1();
+WARNING: plpython: in function unicode_plan_error1:
+DETAIL: plpy.Error: Unknown error in PLy_spi_execute_plan
+ERROR: plpython: function "unicode_plan_error1" could not execute plan
+DETAIL: exceptions.UnicodeEncodeError: 'ascii' codec can't encode character '\u80' in position 0: ordinal not in range(128)
+SELECT unicode_plan_error2();
+ERROR: plpython: function "unicode_plan_error2" could not execute plan
+DETAIL: exceptions.UnicodeEncodeError: 'ascii' codec can't encode character '\u80' in position 0: ordinal not in range(128)