COMMIT in PostgreSQL stored procedure [duplicate]
This question already has an answer here: Committing transactions while executing a postgreql Function 3 answers I have a PostgreSQL stored procedure which loops over a very large list, and makes changes to some of its members using UPDATE . Is there a way to commit these changes per iteration, not at the end of the function execution? It would allow me to run the function for shorts periods of time, making small changes at each run. Thanks, Adam No, it's currently not supported to open or close transactions inside a stored procedure, no. If it did, btw, committing after each iteration would