a) you can't explicitly control transactions in plpgsql. If you need somesort of a form of it, use save points.b) you are trying to outsmart database software, and this is just a biiigmistake, and you should stop doing that completely.