Search Postgresql Archives

Fetch from refcursor and transactions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux