what makes the PL cursor life-cycle must be in the same transaction?

Поиск
Список
Период
Сортировка
От Andy Fan
Тема what makes the PL cursor life-cycle must be in the same transaction?
Дата
Msg-id CAKU4AWqKLRVNG8aTF7AXqbxXEiLFYJ4UY4z1iCAWAp=RezY6zA@mail.gmail.com
обсуждение исходный текст
Ответы Re: what makes the PL cursor life-cycle must be in the same transaction?
Re: what makes the PL cursor life-cycle must be in the same transaction?
Список pgsql-hackers
for example:
begin;
declare cur cursor for select * from t;
insert into t2 values(...);
fetch next cur;
commit;

// after this,  I can't fetch cur any more. 

My question are:
1.  Is this must in principle?  or it is easy to implement as this in PG?
2.  Any bad thing would happen if I keep the named portal (for the cursor) available even the transaction is commit, so that I can fetch the cursor after the transaction is committed?  

Thanks  

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Fabien COELHO
Дата:
Сообщение: Re: Patch to document base64 encoding
Следующее
От: David Rowley
Дата:
Сообщение: Re: Performance issue in foreign-key-aware join estimation