Sorry for the cross posting.

I have a table with the following trigger

CREATE TRIGGER tr_base_cont_trocos_ai AFTER
INSERT OR UPDATE ON base.cont_troco
FOR EACH STATEMENT
EXECUTE FUNCTION tr_gerar_outputs();

Now, the tr_gerar_outputs() takes some time to process, as it generates new 
tables and updates a few materialized views.

In QGIS, when I add or update one or more features and press save, I would 
expect it to be immediate, but it seems that QGIS hangs waiting for the 
function to finish before considering the save operation complete. If the 
function fails, it even prevent the feature to be commit.

Is this expected for a AFTER INSERT OR UPDATE trigger? Shouldn't PostgreSQL 
commit the changes, inform QGIS that the operation was successful and only then 
execute the trigger?

Thanks,

Alexandre Neto

Sent with Shortwave 
<https://www.shortwave.com?utm_medium=email&utm_content=signature&utm_source=c2VuaG9yLm5ldG9AZ21haWwuY29t>
_______________________________________________
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to