 <p>Yes. It's possible. Use plpython for example. Use this in trigger.</p> <pre><code>CREATE OR REPLACE FUNCTION move_file(old_path text, new_path text) RETURNS boolean AS $$ import shutil try: shutil.move(old_path, new_path) return True except: return False $$ LANGUAGE 'plpythonu' VOLATILE; </code></pre>