title: Give a user permission to ALTER a function
body: <p>I try to <code>ALTER</code> a function with a new user and I get the error:</p>
  
  <pre><code>ERROR:  must be owner of function ACases
  ********** Error **********
  
  ERROR: must be owner of function ACases
  SQL state: 42501
  </code></pre>
  
  <p>What permission do I have to give to a user so he can <code>ALTER</code> that function?
  The only way I found was to make the user the <code>OWNER</code> of the function.</p>
  
  <p>But if that is the case, only one user (owner) can <code>ALTER</code> the function. So how would I change the <code>OWNER</code> for all functions?</p>
  
  <pre><code>CREATE OR REPLACE FUNCTION public."ACases"(caseid integer)
    RETURNS boolean AS
  $BODY$
  DECLARE
  BEGIN
          RETURN FALSE;
  END;
  $BODY$
    LANGUAGE plpgsql;
  ALTER FUNCTION public."ACases"(integer) OWNER TO postgres;
  
  GRANT ALL PRIVILEGES ON FUNCTION public."ACases"(integer) TO user_name;
  </code></pre>