title: Postgresql: error "must be owner of relation" when changing a owner object
body: <p>What is the <code>grant</code> option/trick I need to give to the current user ("<em>userA</em>") to allow him to change a object's owner which belongs by another user ("<em>userC</em>")?</p>
  
  <p>More precisely, the <em>contact</em> table is owned by the <em>userC</em> and when I perform the following query for changing the owner to the <em>userB</em>, connected with the <em>userA</em>:</p>
  
  <pre><code>alter table contact owner to userB;
  </code></pre>
  
  <p>I get this error:</p>
  
  <pre><code>ERROR:  must be owner of relation contact
  </code></pre>
  
  <p>But <em>userA</em> has all needed rights to do that normally (the "<em>create on schema</em>" grant option should be enough):</p>
  
  <pre><code>grant select,insert,update,delete on all tables in schema public to userA; 
  grant select,usage,update on all sequences in schema public to userA;
  grant execute on all functions in schema public to userA;
  grant references, trigger on all tables in schema public to userA;
  grant create on schema public to userA;
  grant usage on schema public to userA;
  </code></pre>
  
  <p>Thks</p>
  
  <hr/>
  
  <p>Command line output:</p>
  
  <pre><code>root@server:~# psql -U userA myDatabase
  myDataBase=&gt;\dt contact
      List of relations
  Schema |  Name   |   Type   |  Owner
  -------+---------+----------+---------
  public | contact | table    | userC
  (1 row)
  myDataBase=&gt;
  myDataBase=&gt;alter table contact owner to userB;
  ERROR:  must be owner of relation public.contact
  myDataBase=&gt;
  </code></pre>