aboutsummaryrefslogtreecommitdiff
path: root/src/pl/plpython/sql/plpython_error.sql
diff options
context:
space:
mode:
Diffstat (limited to 'src/pl/plpython/sql/plpython_error.sql')
-rw-r--r--src/pl/plpython/sql/plpython_error.sql13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/pl/plpython/sql/plpython_error.sql b/src/pl/plpython/sql/plpython_error.sql
new file mode 100644
index 00000000000..f1939eb8ffb
--- /dev/null
+++ b/src/pl/plpython/sql/plpython_error.sql
@@ -0,0 +1,13 @@
+
+-- 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');
+SELECT invalid_type_caught('rick');
+SELECT invalid_type_reraised('rick');
+SELECT valid_type('rick');
+
+-- Security sandbox tests
+SELECT write_file('/tmp/plpython','Only trusted users should be able to do this!');
+SELECT read_file('/tmp/plpython');