Fetch from refcursor and transactions

Поиск
Список
Период
Сортировка
От aasat
Тема Fetch from refcursor and transactions
Дата
Msg-id 1324646025312-5097158.post@n5.nabble.com
обсуждение исходный текст
Ответы Re: Fetch from refcursor and transactions
Список pgsql-general
Hi,

I have question about fetching data from refcursor, why this operation
required to be inside transaction?

for example

with transaction

begin;
select * from foo();
fetch all from "<unnamed portal 1>";
commit;

when I try this without transaction I get error

select * from foo();
fetch all from "<unnamed portal 1>";

ERROR:  cursor "<unnamed portal 1>" does not exist

why cursor "<unnamed portal 1>" are not defined in session and required
transaction?


best regards,
Wojciech



--
View this message in context:
http://postgresql.1045698.n5.nabble.com/Fetch-from-refcursor-and-transactions-tp5097158p5097158.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

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

Предыдущее
От: Clemens Eisserer
Дата:
Сообщение: Re: Initdb fails on openwrt in "creating template1 database"
Следующее
От: Gavin Flower
Дата:
Сообщение: Re: PostgreSQL DBA in SPAAAAAAAACE