SELECT invalid_type_uncaught('rick');
NOTICE:  plpython: in function __plpython_procedure_invalid_type_uncaught_49801:
plpy.SPIError: Cache lookup for type `test' failed.
SELECT invalid_type_caught('rick');
NOTICE:  plpython: in function __plpython_procedure_invalid_type_caught_49802:
plpy.SPIError: Cache lookup for type `test' failed.
SELECT invalid_type_reraised('rick');
NOTICE:  plpython: in function __plpython_procedure_invalid_type_reraised_49803:
plpy.SPIError: Cache lookup for type `test' failed.
SELECT valid_type('rick');
 valid_type 
------------
 
(1 row)

SELECT read_file('/etc/passwd');
ERROR:  plpython: Call of function `__plpython_procedure_read_file_49809' failed.
exceptions.IOError: can't open files in restricted mode
SELECT write_file('/tmp/plpython','This is very bad');
ERROR:  plpython: Call of function `__plpython_procedure_write_file_49810' failed.
exceptions.IOError: can't open files in restricted mode
SELECT getpid();
ERROR:  plpython: Call of function `__plpython_procedure_getpid_49811' failed.
exceptions.AttributeError: getpid
SELECT uname();
ERROR:  plpython: Call of function `__plpython_procedure_uname_49812' failed.
exceptions.AttributeError: uname
SELECT sys_exit();
ERROR:  plpython: Call of function `__plpython_procedure_sys_exit_49813' failed.
exceptions.AttributeError: exit
SELECT sys_argv();
    sys_argv    
----------------
 ['RESTRICTED']
(1 row)

