2001-05-09 15:54:38 -04:00
|
|
|
SELECT invalid_type_uncaught('rick');
|
2003-01-31 17:25:14 -05:00
|
|
|
WARNING: plpython: in function invalid_type_uncaught:
|
|
|
|
|
plpy.SPIError: Unknown error in PLy_spi_prepare.
|
|
|
|
|
ERROR: Type "test" does not exist
|
2001-05-09 15:54:38 -04:00
|
|
|
SELECT invalid_type_caught('rick');
|
2003-01-31 17:25:14 -05:00
|
|
|
WARNING: plpython: in function invalid_type_caught:
|
|
|
|
|
plpy.SPIError: Unknown error in PLy_spi_prepare.
|
|
|
|
|
ERROR: Type "test" does not exist
|
2001-05-09 15:54:38 -04:00
|
|
|
SELECT invalid_type_reraised('rick');
|
2003-01-31 17:25:14 -05:00
|
|
|
WARNING: plpython: in function invalid_type_reraised:
|
|
|
|
|
plpy.SPIError: Unknown error in PLy_spi_prepare.
|
|
|
|
|
ERROR: Type "test" does not exist
|
2001-05-09 15:54:38 -04:00
|
|
|
SELECT valid_type('rick');
|
|
|
|
|
valid_type
|
|
|
|
|
------------
|
|
|
|
|
|
|
|
|
|
(1 row)
|
|
|
|
|
|
2001-11-16 13:04:31 -05:00
|
|
|
SELECT read_file('/etc/passwd');
|
2003-01-31 17:25:14 -05:00
|
|
|
ERROR: plpython: Call of function `read_file' failed.
|
2001-11-16 13:04:31 -05:00
|
|
|
exceptions.IOError: can't open files in restricted mode
|
|
|
|
|
SELECT write_file('/tmp/plpython','This is very bad');
|
2003-01-31 17:25:14 -05:00
|
|
|
ERROR: plpython: Call of function `write_file' failed.
|
2001-11-16 13:04:31 -05:00
|
|
|
exceptions.IOError: can't open files in restricted mode
|
|
|
|
|
SELECT getpid();
|
2003-01-31 17:25:14 -05:00
|
|
|
ERROR: plpython: Call of function `getpid' failed.
|
|
|
|
|
exceptions.AttributeError: 'module' object has no attribute 'getpid'
|
2001-11-16 13:04:31 -05:00
|
|
|
SELECT uname();
|
2003-01-31 17:25:14 -05:00
|
|
|
ERROR: plpython: Call of function `uname' failed.
|
|
|
|
|
exceptions.AttributeError: 'module' object has no attribute 'uname'
|
2001-11-16 13:04:31 -05:00
|
|
|
SELECT sys_exit();
|
2003-01-31 17:25:14 -05:00
|
|
|
ERROR: plpython: Call of function `sys_exit' failed.
|
|
|
|
|
exceptions.AttributeError: 'module' object has no attribute 'exit'
|
2001-11-16 13:04:31 -05:00
|
|
|
SELECT sys_argv();
|
|
|
|
|
sys_argv
|
|
|
|
|
----------------
|
|
|
|
|
['RESTRICTED']
|
|
|
|
|
(1 row)
|
|
|
|
|
|