diff --git a/src/pl/plpython/expected/plpython_error.out b/src/pl/plpython/expected/plpython_error.out index f2bf34f996af8bca447239030bc5a029cafa2ae1..06043289fed7be0a69bba9abef97f935608c4c50 100644 --- a/src/pl/plpython/expected/plpython_error.out +++ b/src/pl/plpython/expected/plpython_error.out @@ -19,16 +19,3 @@ SELECT valid_type('rick'); (1 row) --- Security sandbox tests -SELECT write_file('/tmp/plpython','Only trusted users should be able to do this!'); - write_file ------------------------------- - Wrote to file: /tmp/plpython -(1 row) - -SELECT read_file('/tmp/plpython'); - read_file ------------------------------------------------ - Only trusted users should be able to do this! -(1 row) - diff --git a/src/pl/plpython/expected/plpython_function.out b/src/pl/plpython/expected/plpython_function.out index def301affb1f88476fbfdc5e3ce41cad508ab53c..cc1415dca8d7402ffa68df4f9d1bd16a74d02caf 100644 --- a/src/pl/plpython/expected/plpython_function.out +++ b/src/pl/plpython/expected/plpython_function.out @@ -255,13 +255,6 @@ for r in rv: return seq ' LANGUAGE plpythonu; -CREATE OR REPLACE FUNCTION read_file(text) RETURNS text AS ' - return open(args[0]).read() -' LANGUAGE plpythonu; -CREATE OR REPLACE FUNCTION write_file(text,text) RETURNS text AS ' - open(args[0],"w").write(args[1]) - return "Wrote to file: %s" % args[0] -' LANGUAGE plpythonu; -- -- Universal Newline Support -- diff --git a/src/pl/plpython/sql/plpython_error.sql b/src/pl/plpython/sql/plpython_error.sql index f1939eb8ffba46faeafa50113077b1f3f681b37b..2f0486fed9231ebd6da05900f8291c5be0d233b2 100644 --- a/src/pl/plpython/sql/plpython_error.sql +++ b/src/pl/plpython/sql/plpython_error.sql @@ -7,7 +7,3 @@ 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'); diff --git a/src/pl/plpython/sql/plpython_function.sql b/src/pl/plpython/sql/plpython_function.sql index c849c3e5b97373782523b6aea864d1382a6b510b..25ac388495a97689651cc4aebe7b522ac6ca587e 100644 --- a/src/pl/plpython/sql/plpython_function.sql +++ b/src/pl/plpython/sql/plpython_function.sql @@ -298,15 +298,6 @@ return seq ' LANGUAGE plpythonu; -CREATE OR REPLACE FUNCTION read_file(text) RETURNS text AS ' - return open(args[0]).read() -' LANGUAGE plpythonu; - -CREATE OR REPLACE FUNCTION write_file(text,text) RETURNS text AS ' - open(args[0],"w").write(args[1]) - return "Wrote to file: %s" % args[0] -' LANGUAGE plpythonu; - -- -- Universal Newline Support --