whatever calls the function is responsible for transaction level change, because SELECT BLA(); already by default is wrapped by begin;end; - and you can only change transaction level right after BEGIN; although , I feel your pain, it is not possible.