title: Postgresql : Trigger in background
body: <p>I need to have my trigger to run after the field s updated or to run in background. Since for now as soon as the trigger is fired the UI is blocked until the procedure in the trigger itself is executed.
  Anyway to make the trigger in such a way that as soon as the field is updated, the UI do not block away.</p>
  
  <p>I have tried:</p>
  
  <pre><code>CREATE CONSTRAINT TRIGGER property_created_simple_prod_trigger
      AFTER UPDATE ON properties DEFERRABLE INITIALLY DEFERRED
      FOR EACH ROW 
  EXECUTE PROCEDURE simple_production_materialized_view_procedure_trigger();
  </code></pre>
  
  <p>But hard luck nothing works.</p>