title: How can I call a postgres function in myBatis xml mapper?
body: <p>how can I call a function in myBatis using xml? </p>
  
  <p>I have this function</p>
  
  <pre><code>CREATE OR REPLACE FUNCTION save_audit_deletions(IN days numeric, IN 
  table_name text) 
  RETURNS void AS
  $body$
  DECLARE
     interval INT;
  BEGIN
  
      UPDATE table_name SET backup = 1 WHERE backup = 0 AND creationdate &gt;= now()::DATE - days AND creationdate &lt; now()::DATE;
  
      IF copy_func(table_name, days) &gt; 0 THEN
      DELETE FROM table_name WHERE backup = 1;
      ELSE
      UPDATE table_name SET backup = 0 WHERE backup = 1;
      END IF;
  END
  $body$
  LANGUAGE plpgsql;
  </code></pre>
  
  <p>How can i call this function passing parameters? Thank you.</p>