Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1e6201a

Browse files
committed
Add an expected case to cover error message as spelled by python 2.2.3.
Per buildfarm results and Michael Fuhr.
1 parent060d13f commit1e6201a

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
-- test error handling, i forgot to restore Warn_restart in
2+
-- the trigger handler once. the errors and subsequent core dump were
3+
-- interesting.
4+
SELECT invalid_type_uncaught('rick');
5+
WARNING: plpython: in function invalid_type_uncaught:
6+
DETAIL: plpy.SPIError: Unknown error in PLy_spi_prepare
7+
ERROR: type "test" does not exist
8+
SELECT invalid_type_caught('rick');
9+
WARNING: plpython: in function invalid_type_caught:
10+
DETAIL: plpy.SPIError: Unknown error in PLy_spi_prepare
11+
ERROR: type "test" does not exist
12+
SELECT invalid_type_reraised('rick');
13+
WARNING: plpython: in function invalid_type_reraised:
14+
DETAIL: plpy.SPIError: Unknown error in PLy_spi_prepare
15+
ERROR: type "test" does not exist
16+
SELECT valid_type('rick');
17+
valid_type
18+
------------
19+
20+
(1 row)
21+
22+
--
23+
-- Test Unicode error handling.
24+
--
25+
SELECT unicode_return_error();
26+
ERROR: plpython: function "unicode_return_error" could not create return value
27+
DETAIL: exceptions.UnicodeError: ASCII encoding error: ordinal not in range(128)
28+
INSERT INTO unicode_test (testvalue) VALUES ('test');
29+
ERROR: plpython: function "unicode_trigger_error" could not modify tuple
30+
DETAIL: exceptions.UnicodeError: ASCII encoding error: ordinal not in range(128)
31+
SELECT unicode_plan_error1();
32+
WARNING: plpython: in function unicode_plan_error1:
33+
DETAIL: plpy.Error: Unknown error in PLy_spi_execute_plan
34+
ERROR: plpython: function "unicode_plan_error1" could not execute plan
35+
DETAIL: exceptions.UnicodeError: ASCII encoding error: ordinal not in range(128)
36+
SELECT unicode_plan_error2();
37+
ERROR: plpython: function "unicode_plan_error2" could not execute plan
38+
DETAIL: exceptions.UnicodeError: ASCII encoding error: ordinal not in range(128)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp