transaction isolation level in plpgsql function

Started by Sergey Morozover 17 years ago3 messagesgeneral
Jump to latest
#1Sergey Moroz
smo@mgcp.com

Is there any way to set transaction isolation level inside plpgsql function?
In my case I have no control of transaction before function is started.

--
Sincerely,
Sergey Moroz

#2Pavan Deolasee
pavan.deolasee@gmail.com
In reply to: Sergey Moroz (#1)
Re: transaction isolation level in plpgsql function

On Fri, Nov 21, 2008 at 1:19 PM, Sergey Moroz <smo@mgcp.com> wrote:

Is there any way to set transaction isolation level inside plpgsql
function? In my case I have no control of transaction before function is
started.

I don't think there can be any. You are already inside a transaction when
plpgsql function is called and there is no way to commit and start new
transaction inside plpgsql.

Thanks,
Pavan

--
Pavan Deolasee
EnterpriseDB http://www.enterprisedb.com

#3Grzegorz Jaśkiewicz
gryzman@gmail.com
In reply to: Pavan Deolasee (#2)
Re: transaction isolation level in plpgsql function

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.