Re: procedures and transactions
От | Rob Nikander |
---|---|
Тема | Re: procedures and transactions |
Дата | |
Msg-id | CB279644-3C25-4C8D-BBA2-0142495AD97B@gmail.com обсуждение исходный текст |
Ответ на | Re: procedures and transactions (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>) |
Ответы |
Re: procedures and transactions
|
Список | pgsql-general |
> On Feb 20, 2019, at 10:07 AM, Peter Eisentraut <peter.eisentraut@2ndquadrant.com> wrote: > > You can run SET TRANSACTION ISOLATION LEVEL in a procedure. I tried that before but I get this error: create or replace procedure t_test(n integer) as $$ begin set transaction isolation level serializable; raise notice 'current isolation level: %', (select current_setting('transaction_isolation')); raise notice 'current txid: %', (select txid_current()); end; $$ language plpgsql; mydb=# call t_test(1); ERROR: SET TRANSACTION ISOLATION LEVEL must be called before any query CONTEXT: SQL statement "SET transaction isolation level serializable"
В списке pgsql-general по дате отправления: