I have a plpgsql function which updates table data. I want to call this function within a loop passing the looping variable as an argument, and commit after each function call.
I tried to make another plpgsql function, but I figured out that i can't do commit in a function unlike oracle procedure.
Is there a way to do this in a regular sql editor or psql?