a) you can't explicitly control transactions in plpgsql. If you need some sort of a form of it, use save points. b) you are trying to outsmart database software, and this is just a biiig mistake, and you should stop doing that completely.
Чтобы сделать работу с сайтом удобнее, мы используем cookie и аналитический сервис «Яндекс.Метрика». Продолжая пользоваться сайтом, вы соглашаетесь с их использованием.