title: How do I change the owner of an event trigger in postgresql?
body: <p>The <a href="https://www.postgresql.org/docs/9.6/static/sql-altereventtrigger.html" rel="nofollow noreferrer">documentation</a> states that the command for altering the owner of an event trigger is:</p>
  
  <p><code>ALTER EVENT TRIGGER name OWNER TO { new_owner | CURRENT_USER | SESSION_USER }</code></p>
  
  <p>But it errors with:</p>
  
  <p><code>[42704] ERROR: event trigger "insert_component_relationship" does not exist</code></p>
  
  <p>I thought that meant I needed to qualify it with the schema name so I tried:</p>
  
  <p><code>ALTER EVENT TRIGGER schema.name OWNER TO { new_owner }</code></p>
  
  <p>but that screamed at me as well with: </p>
  
  <p><code>[42601] ERROR: syntax error at or near "."</code></p>
  
  <p>Then I just started trying other combinations of commands I thought would work, ex:</p>
  
  <p><code>ALTER TRIGGER name ON table OWNER TO { new_owner }</code></p>
  
  <p><code>ALTER TRIGGER name ON schema.table OWNER TO { new_owner }</code></p>
  
  <p>To no avail. Under the <code>name</code> parameter on this <a href="https://www.postgresql.org/docs/10/static/sql-createtrigger.html" rel="nofollow noreferrer">page</a> seems to suggest that the schema is inferred when it's created but makes no mention of schema qualifying when trying to alter the trigger. </p>
  
  <p>EDIT Actual command run with pseudo values:</p>
  
  <p><code>ALTER EVENT TRIGGER modify_relationship OWNER TO new_admin_user;</code></p>
  
  <p><code>ALTER EVENT TRIGGER products.modify_relationship OWNER TO new_admin_user;</code> </p>